diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-03-02 16:00:01 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-03-02 16:00:01 -0500 |
commit | 2bce4d3fb5699b3771fb854b0e2ef3477b949445 (patch) | |
tree | af9558336b09cda62a588869b12b275e1c203043 /SmartDeviceLink/SDLLogMacros.h | |
parent | 461e7c4c555b2cbee58cfa1b1d13cb1d70eb35c0 (diff) | |
download | sdl_ios-2bce4d3fb5699b3771fb854b0e2ef3477b949445.tar.gz |
Delete old logging files
* This does not build
* Module map stubs for SDL files
* Moved macros to their own file
Diffstat (limited to 'SmartDeviceLink/SDLLogMacros.h')
-rw-r--r-- | SmartDeviceLink/SDLLogMacros.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLLogMacros.h b/SmartDeviceLink/SDLLogMacros.h new file mode 100644 index 000000000..6bf0ecd0e --- /dev/null +++ b/SmartDeviceLink/SDLLogMacros.h @@ -0,0 +1,35 @@ +// +// SDLLogMacros.h +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 3/2/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#pragma mark - Macros + +#pragma mark - General Macros +#define SDLLOG_FILE [[[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lastPathComponent] stringByDeletingPathExtension] +#define SDLLOG_FUNC [NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] + +#pragma mark Debug Logs + +#if DEBUG + +#define SDLLogV(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelVerbose fileName:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ message:msg, ##__VA_ARGS__]; +#define SDLLogD(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelDebug fileName:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ message:msg, ##__VA_ARGS__]; + +#else + +#define SDLLogV(msg, ...) +#define SDLLogD(msg, ...) + +#endif + + +#pragma mark Release Logs + +#define SDLLogW(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelWarning fileName:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ message:msg, ##__VA_ARGS__]; +#define SDLLogE(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelError fileName:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ message:msg, ##__VA_ARGS__]; |