-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE]: refactor codes and add logger
- Loading branch information
1 parent
7c3e1eb
commit 3e26df9
Showing
29 changed files
with
760 additions
and
458 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import pino, { Bindings } from 'pino'; | ||
import config from './index'; | ||
|
||
export default pino({ | ||
level: config.logger.level, | ||
formatters: { | ||
level: label => { | ||
return { level: label.toUpperCase() }; | ||
}, | ||
}, | ||
timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`, | ||
bindings: (bindings: Bindings) => { | ||
return { | ||
pid: bindings.pid, | ||
host: bindings.hostname, | ||
}; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.