Skip to content
Snippets Groups Projects
Commit 8658b1e7 authored by timothycarambat's avatar timothycarambat
Browse files

linting

parent 29c9eeaa
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,8 @@ class Logger { ...@@ -5,7 +5,8 @@ class Logger {
static _instance; static _instance;
constructor() { constructor() {
if (Logger._instance) return Logger._instance; if (Logger._instance) return Logger._instance;
this.logger = process.env.NODE_ENV === 'production' ? this.getWinstonLogger() : console; this.logger =
process.env.NODE_ENV === "production" ? this.getWinstonLogger() : console;
Logger._instance = this; Logger._instance = this;
} }
...@@ -19,8 +20,9 @@ class Logger { ...@@ -19,8 +20,9 @@ class Logger {
winston.format.colorize(), winston.format.colorize(),
winston.format.printf( winston.format.printf(
({ level, message, service, origin = "" }) => { ({ level, message, service, origin = "" }) => {
return `\x1b[36m[${service}]\x1b[0m${origin ? `\x1b[33m[${origin}]\x1b[0m` : "" return `\x1b[36m[${service}]\x1b[0m${
} ${level}: ${message}`; origin ? `\x1b[33m[${origin}]\x1b[0m` : ""
} ${level}: ${message}`;
} }
) )
), ),
......
...@@ -5,7 +5,8 @@ class Logger { ...@@ -5,7 +5,8 @@ class Logger {
static _instance; static _instance;
constructor() { constructor() {
if (Logger._instance) return Logger._instance; if (Logger._instance) return Logger._instance;
this.logger = process.env.NODE_ENV === 'production' ? this.getWinstonLogger() : console; this.logger =
process.env.NODE_ENV === "production" ? this.getWinstonLogger() : console;
Logger._instance = this; Logger._instance = this;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment