-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRILog.h
More file actions
30 lines (26 loc) · 1.01 KB
/
RILog.h
File metadata and controls
30 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// RILog.h
//
// Created by Jiva DeVoe on 11/22/12.
// Copyright (c) 2012 Random Ideas, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(int, RILogLevel)
{
RI_LOG_NONE = 0,
RI_LOG_ERROR = 100,
RI_LOG_WARN = 200,
RI_LOG_INFO = 300,
RI_LOG_DEBUG = 400
};
@interface RILog : NSObject
@property RILogLevel logLevel;
+(id)sharedInstance;
-(void)logMessageAtLevel:(RILogLevel)inLogLevel withFormat:(NSString *)format, ...;
-(BOOL)isLoggingEnabledOfType:(RILogLevel)type;
@end
#define RILOG(logLevel, ...) [[RILog sharedInstance] logMessageAtLevel:logLevel withFormat:__VA_ARGS__];
#define INFOLOG(...) [[RILog sharedInstance] logMessageAtLevel:RI_LOG_NONE withFormat:__VA_ARGS__];
#define DEBUGLOG(...) [[RILog sharedInstance] logMessageAtLevel:RI_LOG_DEBUG withFormat:__VA_ARGS__];
#define ERRORLOG(...) [[RILog sharedInstance] logMessageAtLevel:RI_LOG_ERROR withFormat:__VA_ARGS__];
#define WARNLOG(...) [[RILog sharedInstance] logMessageAtLevel:RI_LOG_WARN withFormat:__VA_ARGS__];