mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 06:05:28 +00:00
feat: add pino logger for serverside
This commit is contained in:
@@ -14,16 +14,9 @@ const transport = USE_PRETTY_LOGS
|
|||||||
}
|
}
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
// Create the logger instance
|
|
||||||
export const logger = pino({
|
export const logger = pino({
|
||||||
level: LOG_LEVEL,
|
level: LOG_LEVEL,
|
||||||
transport
|
transport
|
||||||
});
|
});
|
||||||
|
|
||||||
// Export a helper to create child loggers with context
|
|
||||||
export function createChildLogger(bindings: Record<string, unknown>) {
|
|
||||||
return logger.child(bindings);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Export types
|
|
||||||
export type Logger = typeof logger;
|
export type Logger = typeof logger;
|
||||||
|
|||||||
Reference in New Issue
Block a user