Created
December 18, 2014 15:58
-
-
Save fwhenin/4e2161a9e6910e7926e3 to your computer and use it in GitHub Desktop.
CocoaLumberJack wrapper for Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DDLogWrapper.h | |
// DMS | |
// | |
// Created by Freddy on 12/18/14. | |
// Copyright (c) 2014 DMSCompany. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface DDLogWrapper : NSObject | |
+ (void) logError:(NSString *)message; | |
+ (void) logWarn:(NSString *)message; | |
+ (void) logInfo:(NSString *)message; | |
+ (void) logDebug:(NSString *)message; | |
+ (void) logVerbose:(NSString *)message; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DDLogWrapper.m | |
// DMS | |
// | |
// Created by Freddy on 12/18/14. | |
// Copyright (c) 2014 DMSCompany. All rights reserved. | |
// | |
#import "DDLogWrapper.h" | |
// Logging Framework Lumberjack | |
#import "DDLog.h" | |
// Definition of the current log level | |
#ifdef DEBUG | |
static const int ddLogLevel = LOG_LEVEL_VERBOSE; | |
#else | |
static const int ddLogLevel = LOG_LEVEL_ERROR; | |
#endif | |
@implementation DDLogWrapper | |
+ (void) logError:(NSString *)message { | |
DDLogError(message); | |
} | |
+ (void) logWarn:(NSString *)message { | |
DDLogWarn(message); | |
} | |
+ (void) logInfo:(NSString *)message { | |
DDLogInfo(message); | |
} | |
+ (void) logDebug:(NSString *)message { | |
DDLogDebug(message); | |
} | |
+ (void) logVerbose:(NSString *)message { | |
DDLogVerbose(message); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment