colorful-chalk-logger
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -5,5 +5,5 @@ import { Chalk } from 'chalk'; | ||
readonly fg: Chalk; | ||
readonly bg: Chalk; | ||
constructor(fg: Color, bg: Color); | ||
readonly bg: Chalk | null; | ||
constructor(fg: Color, bg?: Color); | ||
} | ||
export declare function colorToChalk(color: Color, fg: boolean): any; |
@@ -7,3 +7,6 @@ "use strict"; | ||
this.fg = colorToChalk(fg, true); | ||
this.bg = colorToChalk(bg, false); | ||
if (bg == null) | ||
this.bg = null; | ||
else | ||
this.bg = colorToChalk(bg, false); | ||
} | ||
@@ -10,0 +13,0 @@ } |
@@ -20,7 +20,7 @@ "use strict"; | ||
exports.Level = Level; | ||
exports.DEBUG = new Level('debug', 'debug', new colors_1.ColorfulChalk('#BCBC36', 'black'), new colors_1.ColorfulChalk('#FCA416', 'black')); | ||
exports.VERBOSE = new Level('verbose', 'verbose', new colors_1.ColorfulChalk('cyan', 'black'), new colors_1.ColorfulChalk('cyan', 'black')); | ||
exports.INFO = new Level('info', 'info ', new colors_1.ColorfulChalk('green', 'black'), new colors_1.ColorfulChalk('green', 'black')); | ||
exports.WARN = new Level('warn', 'warn ', new colors_1.ColorfulChalk('magenta', 'black'), new colors_1.ColorfulChalk('magenta', 'black')); | ||
exports.ERROR = new Level('error', 'error', new colors_1.ColorfulChalk('black', 'red'), new colors_1.ColorfulChalk('red', 'black')); | ||
exports.FATAL = new Level('fatal', 'fatal', new colors_1.ColorfulChalk('black', 'redBright'), new colors_1.ColorfulChalk('redBright', 'black')); | ||
exports.DEBUG = new Level('debug', 'debug', new colors_1.ColorfulChalk('#BCBC36'), new colors_1.ColorfulChalk('#FCA416')); | ||
exports.VERBOSE = new Level('verbose', 'verbose', new colors_1.ColorfulChalk('cyan'), new colors_1.ColorfulChalk('cyan')); | ||
exports.INFO = new Level('info', 'info ', new colors_1.ColorfulChalk('green'), new colors_1.ColorfulChalk('green')); | ||
exports.WARN = new Level('warn', 'warn ', new colors_1.ColorfulChalk('magenta'), new colors_1.ColorfulChalk('magenta')); | ||
exports.ERROR = new Level('error', 'error', new colors_1.ColorfulChalk('black', 'red'), new colors_1.ColorfulChalk('red')); | ||
exports.FATAL = new Level('fatal', 'fatal', new colors_1.ColorfulChalk('black', 'redBright'), new colors_1.ColorfulChalk('redBright')); |
@@ -49,3 +49,4 @@ "use strict"; | ||
message = level.contentChalk.fg(message); | ||
message = level.contentChalk.bg(message); | ||
if (level.contentChalk.bg != null) | ||
message = level.contentChalk.bg(message); | ||
} | ||
@@ -59,3 +60,4 @@ return `${header}: ${message}`; | ||
desc = level.headerChalk.fg(desc); | ||
desc = level.headerChalk.bg(desc); | ||
if (level.headerChalk.bg != null) | ||
desc = level.headerChalk.bg(desc); | ||
name = nameChalk(name); | ||
@@ -62,0 +64,0 @@ } |
{ | ||
"name": "colorful-chalk-logger", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "a colorful logger, support control output(format | level) through command-line options.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
22084
327