Skip to content

Commit

Permalink
fix: show full contents of objects in json logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Apr 22, 2024
1 parent fc17ff4 commit f2906b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const log = logger.createLogger<defLvlType>( {
...( configuration.logger.enabled && {
severity: configuration.logger.level,
} ),
stringifyFunc: ( data: string | object ) => ( typeof data === 'object'
? `\n${JSON.stringify( data, null, 2 )}`
: data ),
transportOptions: {
colors: {
info: 'blueBright',
Expand Down

0 comments on commit f2906b0

Please sign in to comment.