@kikiutils/node
Version:
A modular utility library for Node.js offering secure hashing, flexible logging, datetime manipulation, and more.
24 lines • 851 B
TypeScript
/**
* A pino logger instance with the configured stream.
*
* The logger's level is determined based on the `PINO_LOGGER_LEVEL` and `NODE_ENV` environment variables.
* If `PINO_LOGGER_LEVEL` is set, it will be used; otherwise, if `NODE_ENV` is `production`,
* the level will be set to `error`.
*
* To manually change the level, assign the desired level to `logger.level`.
*
* See available levels [here](https://getpino.io/#/docs/api?id=level-string).
*
* @example
* ```typescript
* import logger from '@kikiutils/node/pino';
*
* logger.info('test'); // [2024-07-11 12:12:30.085] INFO: test
*
* // Manually change the level
* logger.level = 'info';
* ```
*/
export declare const pinoLogger: import("pino").Logger<never, boolean>;
export declare const logger: import("pino").Logger<never, boolean>;
//# sourceMappingURL=pino.d.ts.map