Skip to content

Commit 1d84174

Browse files
author
Kagamihara Nadeshiko
committed
Add pino-pretty, and use it
1 parent 3ddb7f5 commit 1d84174

File tree

3 files changed

+156
-14
lines changed

3 files changed

+156
-14
lines changed

package-lock.json

Lines changed: 146 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"microtime": "^3.1.1",
1818
"nanotimer": "^0.3.15",
1919
"pino": "^8.15.1",
20+
"pino-pretty": "^10.2.3",
2021
"typescript": "^5.1.6",
2122
"uuid": "^9.0.0"
2223
},

src/core/util.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ export namespace Log {
2929
* Global instance of ulog that performs the logging.
3030
*/
3131
export const globalLogger = pino({
32-
name: "reactor-ts"
32+
name: "reactor-ts",
33+
transport: {
34+
target: "pino-pretty",
35+
options: {
36+
colorize: true,
37+
sync: true,
38+
ignore: "pid,hostname,time"
39+
}
40+
}
3341
});
3442

3543
/**

0 commit comments

Comments
 (0)