Browse Source

error log

gemercheung 3 năm trước cách đây
mục cha
commit
e8183dde43
1 tập tin đã thay đổi với 9 bổ sung9 xóa
  1. 9 9
      src/scene/scene.service.ts

+ 9 - 9
src/scene/scene.service.ts

@@ -25,7 +25,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
     private rotateService: RotateService,
     private moveService: MoveService,
     private getRouterService: GetRouterService, // @InjectQueue('rotate') private rotateQueue: Queue, // @InjectQueue('walking') private walkingQueue: Queue,
-  ) {}
+  ) { }
   @Client(grpcClientOptions) private readonly client: ClientGrpc;
 
   public _frameInteval: NodeJS.Timeout;
@@ -333,8 +333,8 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
         }
       }
     } catch (error) {
-      this.logger.error('rotate', error);
-      console.log('error', error);
+      this.logger.error('rotate', error.message);
+      console.error('error', error);
     }
     //   },
     // );
@@ -482,7 +482,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
       // });
       // }
     } catch (error) {
-      this.logger.error('walking', error);
+      this.logger.error('walking', error.message);
       this.cleanMoveSteam();
       this.resumeStream();
     }
@@ -549,7 +549,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
       }
     } catch (error) {
       console.error('joystick错误', error);
-      this.logger.error('joystick', error);
+      this.logger.error('joystick', error.message);
     }
   }
   /**
@@ -725,7 +725,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
         }
       }
     } catch (error) {
-      this.logger.error('handleMessage:rtc--error', message);
+      this.logger.error('handleMessage:rtc--error', error.message);
     }
   }
 
@@ -771,7 +771,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
         this.logger.error('updateUserStatus::function-empty');
       }
     } catch (error) {
-      this.logger.error('updateUserStatus::function', error);
+      this.logger.error('updateUserStatus::function', error.message);
     }
   }
 
@@ -815,7 +815,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
                 delete redisData.mediaSrc;
                 this.logger.log(
                   `user:${this.user_id}:first render stream` +
-                    JSON.stringify({ path: clipPath, meta: redisData }),
+                  JSON.stringify({ path: clipPath, meta: redisData }),
                 );
                 const status = await this.pushFirstRender(
                   clipPath,
@@ -859,7 +859,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
           }
         } catch (error) {
           this.stopStream();
-          this.logger.error('handleStream', error);
+          this.logger.error('handleStream', error.message);
         }
       });
     }