Pārlūkot izejas kodu

revert logger mute for the sake test coverage

Richard Köhl 2 gadi atpakaļ
vecāks
revīzija
55c5053458
1 mainītis faili ar 8 papildinājumiem un 16 dzēšanām
  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[] {