Update log format

This commit is contained in:
jeffvli
2023-12-05 18:25:41 -08:00
parent 33b522a2f3
commit b7bbba928d
+5 -1
View File
@@ -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}`,
);
};
};