mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-01 00:36:44 -06:00
Show time
This commit is contained in:
parent
dc21a819d6
commit
7b7ec0340f
1 changed files with 2 additions and 1 deletions
|
@ -12,5 +12,6 @@ function toLevelColor(level: LogLevel): chalk.ChalkStyle {
|
||||||
|
|
||||||
export function log(level: LogLevel, message: string): void {
|
export function log(level: LogLevel, message: string): void {
|
||||||
let color = toLevelColor(level);
|
let color = toLevelColor(level);
|
||||||
console.log(`[${color.bold(level.toUpperCase())}] ${message}`);
|
let time = (new Date()).toLocaleTimeString([], { hour12: false });
|
||||||
|
console.log(`[${time} ${color.bold(level.toUpperCase())}]: ${message}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue