Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import { registerAs } from '@nestjs/config'; import * as env from 'env-var'; import { type Options } from 'pino-http'; export const loggerConfig = registerAs('logger', () => ({ level: env.get('LOGGER_LEVEL').default('info').asString() as Options['level'], prettyPrint: env.get('NODE_ENV').default('development').asString() === 'development', enableRequestLogging: env.get('LOGGER_ENABLE_REQUEST_LOGGING').default('false').asBool(), enableAccessLogging: env.get('LOGGER_ENABLE_ACCESS_LOGGING').default('false').asBool(), })); export const LOGGER_CONFIG_KEY = loggerConfig.KEY; export type LoggerConfig = ReturnType<typeof loggerConfig>; |