瀏覽代碼

revert logger mute for the sake test coverage

Richard Köhl 2 年之前
父節點
當前提交
55c5053458
共有 1 個文件被更改,包括 8 次插入16 次删除
  1. 8 16
      src/infrastructure/logger.ts

+ 8 - 16
src/infrastructure/logger.ts

@@ -56,40 +56,32 @@ export class Logger {
     return this.loggerName === 'test';
   }
 
-  public debug(message: string): void {
+  public debug(message: string) {
+    this.logger.debug(message);
     if (this.isTest()) {
       this.messages.push('[DEBUG] ' + message);
-      return;
     }
-
-    this.logger.debug(message);
   }
 
-  public info(message: string): void {
+  public info(message: string) {
+    this.logger.info(message);
     if (this.isTest()) {
       this.messages.push('[INFO] ' + message);
-      return;
     }
-
-    this.logger.info(message);
   }
 
-  public warn(message: string): void {
+  public warn(message: string) {
+    this.logger.warning(message);
     if (this.isTest()) {
       this.messages.push('[WARNING] ' + message);
-      return;
     }
-
-    this.logger.warning(message);
   }
 
-  public error(message: string): void {
+  public error(message: string) {
+    this.logger.error(message);
     if (this.isTest()) {
       this.messages.push('[ERROR] ' + message);
-      return;
     }
-
-    this.logger.error(message);
   }
 
   public getMessages(): string[] {