Skip to content

Commit 80f61ba

Browse files
author
garenwang
committed
fix :日志8小时时差
1 parent 9c74253 commit 80f61ba

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

QCloudCore/Classes/Base/Logger/QCloudLogModel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ typedef NS_ENUM(uint8_t, QCloudLogLevel) {
3838
- Warnings
3939
- Informational messages
4040
- Debug messages
41-
- Verbose
4241
*/
43-
QCloudLogLevelVerbose = 5,
42+
QCloudLogLevelDebug = 5,
4443
/**
4544
Log level that if set is going to output the following messages to log:
4645
- Errors
4746
- Warnings
4847
- Informational messages
4948
- Debug messages
49+
- Verbose
5050
*/
51-
52-
QCloudLogLevelDebug = 6,
51+
QCloudLogLevelVerbose = 6,
52+
5353

5454
};
5555

QCloudCore/Classes/Base/Logger/QCloudLogger.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import <time.h>
1313
#import <xlocale.h>
1414
#import "QCloudFileLogger.h"
15+
#import "NSDate+QCLOUD.h"
1516
#if TARGET_OS_IOS
1617
#import <UIKit/UIKit.h>
1718
#endif
@@ -205,7 +206,7 @@ - (void)logMessageWithLevel:(QCloudLogLevel)level
205206
QCloudLogModel * (^CreateLog)(void) = ^(void) {
206207
QCloudLogModel *log = [QCloudLogModel new];
207208
log.message = message;
208-
log.date = [NSDate date];
209+
log.date = [NSDate localDate];
209210
log.level = level;
210211
log.funciton = [NSString stringWithCString:cmd encoding:NSUTF8StringEncoding];
211212
log.file = [NSString stringWithCString:file encoding:NSUTF8StringEncoding];

0 commit comments

Comments
 (0)