From 11942824a4f0bdedbd9cbcd36412a0108b369bd6 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 28 Jan 2018 04:31:44 +0100 Subject: [PATCH] fix(cleanup): --- defaults.yml | 4 ---- ts/smartlog.classes.smartlog.ts | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 defaults.yml diff --git a/defaults.yml b/defaults.yml deleted file mode 100644 index 5f158cc..0000000 --- a/defaults.yml +++ /dev/null @@ -1,4 +0,0 @@ -module.name: smartmodule -module.description: a smart description -module.author: Lossless GmbH -module.license: MIT \ No newline at end of file diff --git a/ts/smartlog.classes.smartlog.ts b/ts/smartlog.classes.smartlog.ts index 7996f39..52e33ab 100644 --- a/ts/smartlog.classes.smartlog.ts +++ b/ts/smartlog.classes.smartlog.ts @@ -10,9 +10,9 @@ export type TLogLevel = export class Smartlog { private winstonInstance = new plugins.winston.createLogger({ - level: 'silly', + level: "silly", format: plugins.winston.format.json() - }) + }); // ============ // Logger Setup @@ -27,9 +27,9 @@ export class Smartlog { /** * set a minimum serverity level to log - * @param levelArg + * @param levelArg */ - level (levelArg: TLogLevel) { + level(levelArg: TLogLevel) { this.winstonInstance.level(levelArg); } @@ -39,29 +39,29 @@ export class Smartlog { /** * log stuff * @param logLevelArg - * @param logMessageArg + * @param logMessageArg */ log(logLevelArg: TLogLevel, logMessageArg: string) { - this.winstonInstance.log(logLevelArg, logMessageArg) + this.winstonInstance.log(logLevelArg, logMessageArg); } silly(logMessageArg: string) { - this.log('silly', logMessageArg) + this.log("silly", logMessageArg); } debug(logMessageArg) { - this.log('debug', logMessageArg) + this.log("debug", logMessageArg); } info(logMessageArg: string) { - this.log('info', logMessageArg) + this.log("info", logMessageArg); } warn(logMessageArg) { - this.log('warn', logMessageArg) + this.log("warn", logMessageArg); } error(logMessageArg) { - this.log('error', logMessageArg) + this.log("error", logMessageArg); } }