Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use sophisticated logger #1129

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: raise required node version
Signed-off-by: jase88 <[email protected]>
jase88 committed Dec 6, 2023
commit 49af968a8d60e0c542843176d91f16f338d1352d
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@
},
"type": "commonjs",
"engines": {
"node": ">=14",
"node": ">=14.17.0",
"npm": "6 - 10"
},
"directories": {
3 changes: 1 addition & 2 deletions src/logger.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ import { type BaseLogger, type Level, type LevelWithSilent, type LoggerExtras, p
const logLevels: Level[] = ['debug', 'error', 'fatal', 'warn', 'info', 'trace'] as const
export const verbosityLevels: LevelWithSilent[] = [...logLevels, 'silent'] as const


export type Logger = BaseLogger & LoggerExtras<{
level: LevelWithSilent
name: string
@@ -38,7 +37,7 @@ export const createLogger: (verbosityLevel: VerbosityLevel) => Logger = (verbosi
target: 'pino-pretty',
options: {
colorize: true,
translateTime: "SYS:yyyy-mm-dd HH:MM:ss.l",
translateTime: 'SYS:yyyy-mm-dd HH:MM:ss.l',
ignore: 'pid,name,hostname',
destination: 2
}