Skip to content

Commit 6486fe7

Browse files
committed
Simple log formatting for non production
1 parent 383f64a commit 6486fe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/components/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const log = createLogger({
3939
format: format.combine(
4040
format.errors({ stack: true }), // Force errors to show stacktrace
4141
format.timestamp(), // Add ISO timestamp to each entry
42-
format.json() // Force output to be in JSON format
42+
process.env.NODE_ENV === 'production' ? format.json() : format.simple()
4343
),
4444
level: config.get('server.logLevel')
4545
});

0 commit comments

Comments
 (0)