mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 19:43:08 +02:00
Update logger
This commit is contained in:
parent
a0a116b7bf
commit
c66532d18f
1 changed files with 2 additions and 1 deletions
|
@ -20,7 +20,8 @@ export default class Logger {
|
|||
public static log(level: LogLevel, message: string): void {
|
||||
const color = toLevelColor(level);
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue