* [ios] remove xcode log color
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5c230981 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5c230981 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5c230981 Branch: refs/heads/0.16-dev Commit: 5c2309810e541f95d0f9bb5200739cb47c391027 Parents: 7941d02 Author: acton393 <zhangxing610...@gmail.com> Authored: Wed Sep 6 16:23:27 2017 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Wed Sep 6 16:23:27 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Utility/WXLog.m | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5c230981/ios/sdk/WeexSDK/Sources/Utility/WXLog.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXLog.m b/ios/sdk/WeexSDK/Sources/Utility/WXLog.m index ae85c7b..2db66d2 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXLog.m +++ b/ios/sdk/WeexSDK/Sources/Utility/WXLog.m @@ -46,13 +46,6 @@ // To reset the foreground and background color (to default values) in one operation: // Insert the ESCAPE_SEQ into your string, followed by ";" -#define XCODE_COLORS_ESCAPE_SEQ "\033[" - -#define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE_SEQ "fg;" // Clear any foreground color -#define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE_SEQ "bg;" // Clear any background color -#define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE_SEQ ";" // Clear any foreground or background color - - #ifdef DEBUG static const WXLogLevel defaultLogLevel = WXLogLevelLog; #else @@ -133,32 +126,26 @@ static id<WXLogProtocol> _externalLog; + (void)log:(WXLogFlag)flag file:(const char *)fileName line:(NSUInteger)line message:(NSString *)message { NSString *flagString; - NSString *flagColor; switch (flag) { case WXLogFlagError: { flagString = @"error"; - flagColor = @"fg255,0,0;"; } break; case WXLogFlagWarning: flagString = @"warn"; - flagColor = @"fg255,165,0;"; break; case WXLogFlagDebug: flagString = @"debug"; - flagColor = @"fg0,128,0;"; break; case WXLogFlagLog: flagString = @"log"; - flagColor = @"fg128,128,128;"; break; default: flagString = @"info"; - flagColor = @"fg100,149,237;"; break; } - NSString *logMessage = [NSString stringWithFormat:@"%s%@ <Weex>[%@]%s:%ld, %@ %s", XCODE_COLORS_ESCAPE_SEQ, flagColor, flagString, fileName, (unsigned long)line, message, XCODE_COLORS_RESET]; + NSString *logMessage = [NSString stringWithFormat:@"<Weex>[%@]%s:%ld, %@", flagString, fileName, (unsigned long)line, message]; if ([_externalLog logLevel] & flag) {