Skip to content

Commit

Permalink
update logger
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed May 9, 2024
1 parent ac406de commit dc7ea49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ - (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name typ
setUserCallbackToXp2p(XP2PDataMsgHandle, XP2PMsgHandle, XP2PReviceDeviceCustomMsgHandle);

//启动logger
self.logger = [[TIoTCoreLogger alloc] init];
self.logger.appuuid = nsstr_user_id;
self.logger.version = [TIoTCoreXP2PBridge getSDKVersion];
[self.logger startLogging];
if (self.logger == nil) {
self.logger = [[TIoTCoreLogger alloc] init];
self.logger.appuuid = nsstr_user_id;
self.logger.version = [TIoTCoreXP2PBridge getSDKVersion];
[self.logger startLogging];
}

//1.配置IOT_P2P SDK
self.pro_id = pro_id;
Expand Down Expand Up @@ -516,7 +518,7 @@ - (void)stopService:(NSString *)dev_name {
stopService(dev_name.UTF8String);

[self reportUserList:0 status:@"end"];
[self.logger stopLogging];
// [self.logger stopLogging];
//关闭文件
// [fileHandle closeFile];
// fileHandle = NULL;
Expand Down
2 changes: 1 addition & 1 deletion Source/SDK/LinkVideo/log/TIoTCoreLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong)NSString *version;

- (void)startLogging;
- (void)stopLogging;
//- (void)stopLogging;
- (void)addLog:(NSString *)message;
//- (void)reportLog;

Expand Down

0 comments on commit dc7ea49

Please sign in to comment.