From 94b7c7e7badd7b09efd8bdd736ce9948170b403f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B5=B7?= Date: Fri, 24 Apr 2020 14:05:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E6=95=88=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index/src/app/utils/logger.ts | 42 ----------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 index/src/app/utils/logger.ts diff --git a/index/src/app/utils/logger.ts b/index/src/app/utils/logger.ts deleted file mode 100644 index 6bb0b86..0000000 --- a/index/src/app/utils/logger.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {environment} from '../../environments/environment'; - -export class Logger { - - private static inited = false; - - static info(obj: object) { - this.printLogInfo(); - if (environment.logger) { - // tslint:disable-next-line:no-console - console.info(obj); - } - } - - static debug(obj: object) { - this.printLogInfo(); - if (environment.logger) { - // tslint:disable-next-line:no-console - console.debug(obj); - } - } - - static error(obj: object) { - this.printLogInfo(); - if (environment.logger) { - // tslint:disable-next-line:no-console - console.error(obj); - } - } - - static printLogInfo() { - const option = { - environment: environment.production ? 'release' : 'debug', - }; - if (!this.inited) { - // tslint:disable-next-line:no-console - console.info(option); - this.inited = true; - } - } - -}