mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
logs correctly parse error.
This commit is contained in:
@ -11,6 +11,12 @@ export class Logger {
|
||||
let t = ''
|
||||
const args = []
|
||||
for (const name in fields) {
|
||||
if (fields[name] instanceof Error) {
|
||||
t += ' %c%s="%s"%c'
|
||||
args.push('color:#d84949;', name, (fields[name] as Error).message, '')
|
||||
continue
|
||||
}
|
||||
|
||||
if (typeof fields[name] === 'string' || fields[name] instanceof String) {
|
||||
t += ' %c%s=%c"%s"'
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user