This commit is contained in:
archer
2023-08-25 15:45:24 +08:00
parent 6d93059e25
commit 4b088e84c7
6 changed files with 30 additions and 8 deletions

View File

@@ -92,9 +92,9 @@ export const sseResponse = ({
/* add logger */
export const addLog = {
info: (msg: string, obj?: Record<string, any>) => {
global.logger.info(msg, { meta: obj });
global.logger?.info(msg, { meta: obj });
},
error: (msg: string, obj?: Record<string, any>) => {
global.logger.error(msg, { meta: obj });
global.logger?.error(msg, { meta: obj });
}
};