Skip to content

propagate requestId to the logger#962

Open
blurbeast wants to merge 1 commit into
LabsCrypt:mainfrom
blurbeast:main
Open

propagate requestId to the logger#962
blurbeast wants to merge 1 commit into
LabsCrypt:mainfrom
blurbeast:main

Conversation

@blurbeast
Copy link
Copy Markdown
Contributor

this pr resolves the issue tagged below

closes #890

@blurbeast
Copy link
Copy Markdown
Contributor Author

@ogazboiz

/\blogger\.(info|warn|error)\s*\(/g,
"logger.withContext().$1(",
);
fs.writeFileSync(filePath, content, "utf8");
warn: (message: string, meta?: any) =>
logger.warn(message, { ...baseMeta, ...meta }),
error: (message: string, meta?: any) =>
logger.error(message, { ...baseMeta, ...meta }),

return {
info: (message: string, meta?: any) =>
logger.info(message, { ...baseMeta, ...meta }),
info: (message: string, meta?: any) =>
logger.info(message, { ...baseMeta, ...meta }),
warn: (message: string, meta?: any) =>
logger.warn(message, { ...baseMeta, ...meta }),
warn: (message: string, meta?: any) =>
logger.warn(message, { ...baseMeta, ...meta }),
error: (message: string, meta?: any) =>
logger.error(message, { ...baseMeta, ...meta }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Propagate requestId into all log lines via withContext helper

2 participants