mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
Update log format
This commit is contained in:
+5
-1
@@ -25,7 +25,11 @@ const baseLog = (errorType: 'error' | 'info' | 'success' | 'warn') => {
|
||||
return (text: string, options?: { context?: Record<string, any>; toast?: boolean }): void => {
|
||||
// const { toast } = options || {};
|
||||
const now = dayjs().toISOString();
|
||||
console.log(`${logString}${now}${text}${JSON.stringify(options?.context)}${reset}`);
|
||||
console.log(
|
||||
`${logString}${now}: ${text} | ${
|
||||
options?.context && JSON.stringify(options.context)
|
||||
}${reset}`,
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user