diff --git a/src/logger.ts b/src/logger.ts index 971513e..882e1cc 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -54,7 +54,7 @@ function log(message: any[], level: Level, namespace: string) : void { .replace("$namespace", namespace) let lvl = get_string(level) - if (options.pad_level) lvl = pad(lvl) + if (!options.pad_level) lvl = lvl.trimEnd() const head_color = head.replace('$level', get_color(level)(lvl)) const head_bw = head.replace('$level', lvl) @@ -69,10 +69,6 @@ function log(message: any[], level: Level, namespace: string) : void { } } -function pad(str: string) : string { - return str + " ".repeat("WARNING".length - str.length) -} - function get_string(level: Level) : string { switch (level) { case Level.DEBUG: return "DEBUG "