Skip to content

Commit bc53740

Browse files
committed
Default pretty logs to singleline
1 parent 263b3b4 commit bc53740

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

yarn-project/foundation/src/config/env_var.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type EnvVar =
5656
| 'L2_QUEUE_SIZE'
5757
| 'LOG_ELAPSED_TIME'
5858
| 'LOG_JSON'
59+
| 'LOG_MULTILINE'
5960
| 'LOG_LEVEL'
6061
| 'MNEMONIC'
6162
| 'NETWORK_NAME'

yarn-project/foundation/src/log/pino-logger.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ const pinoPrettyOpts = {
7878
customLevels: 'fatal:60,error:50,warn:40,info:30,verbose:25,debug:20,trace:10',
7979
customColors: 'fatal:bgRed,error:red,warn:yellow,info:green,verbose:magenta,debug:blue,trace:gray',
8080
minimumLevel: 'trace' as const,
81+
singleLine: !['1', 'true'].includes(process.env.LOG_MULTILINE ?? ''),
8182
};
83+
8284
const prettyTransport: pino.TransportSingleOptions = {
8385
target: 'pino-pretty',
8486
options: pinoPrettyOpts,

0 commit comments

Comments
 (0)