From 60ae293a6ece832fcf31584d816b1a33ce4f7959 Mon Sep 17 00:00:00 2001 From: zxm99888 Date: Mon, 29 Aug 2016 13:00:31 +0800 Subject: [PATCH] fix crash in device --- Source/BFKit/BFLog.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/BFKit/BFLog.m b/Source/BFKit/BFLog.m index e7aa1a5..82c8de6 100644 --- a/Source/BFKit/BFLog.m +++ b/Source/BFKit/BFLog.m @@ -56,9 +56,9 @@ void ExtendNSLog(const char * _Nonnull file, int lineNumber, const char * _Nonnu NSString *log = [NSString stringWithFormat:@"%s:%d %s: %s", [fileName UTF8String], lineNumber, [functionName UTF8String], [body UTF8String]]; fprintf(stderr, "%s %s:%d %s: %s", [[NSDate dateInformationDescriptionWithInformation:[[NSDate date] dateInformation] dateSeparator:@"-" usFormat:YES nanosecond:YES] UTF8String], [fileName UTF8String], lineNumber, [functionName UTF8String], [body UTF8String]); - logString = [logString stringByAppendingString:[NSString stringWithFormat:@"%@", body]]; + logString = [NSString stringWithFormat:@"%@,%@",logString,body]; - logDetailedString = [logDetailedString stringByAppendingString:[NSString stringWithFormat:@"%@", log]]; + logDetailedString = [NSString stringWithFormat:@"%@,%@",logDetailedString,log]; } + (NSString * _Nonnull)logString {