Files
sign/packages/lib/utils/logger.ts
David Nguyen 824f4a070a feat: demo
2024-03-27 20:31:08 +08:00

17 lines
403 B
TypeScript

import type { LoggerConfig } from 'next-axiom';
import { Logger } from 'next-axiom';
/**
* For usage in server-side code.
*
* When used in a server component, you must flush the logs.
*
* https://github.com/axiomhq/next-axiom?tab=readme-ov-file#server-components
*/
export const buildServerLogger = (config?: LoggerConfig) => {
return new Logger({
source: 'server',
...config,
});
};