1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 07:35:57 +09:00

Update logger

This commit is contained in:
Aya Morisawa 2018-07-13 23:51:16 +09:00
parent a0a116b7bf
commit c66532d18f

View File

@ -20,7 +20,8 @@ export default class Logger {
public static log(level: LogLevel, message: string): void { public static log(level: LogLevel, message: string): void {
const color = toLevelColor(level); const color = toLevelColor(level);
const time = (new Date()).toLocaleTimeString('ja-JP'); const time = (new Date()).toLocaleTimeString('ja-JP');
console.log(`[${time} ${color.bold(level.toUpperCase())}]: ${message}`); const coloredMessage = level === 'Info' ? message : color.bold(message);
console.log(`[${time} ${color.bold(level.toUpperCase())}]: ${coloredMessage}`);
} }
public static error(message: string): void { public static error(message: string): void {