Selaa lähdekoodia

revert logger mute for the sake test coverage

Richard Köhl 2 vuotta sitten
vanhempi
commit
55c5053458
1 muutettua tiedostoa jossa 8 lisäystä ja 16 poistoa
  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[] {