Skip to content

Commit

Permalink
feat: add program to pretty print output
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Aug 27, 2022
1 parent 92e82cd commit e9ba028
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/factories/createLogFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const createLogFormatter = (configuration: LogFormatterConfigurationType)
formattedMessage += ' (@' + String(message.context.package) + ')';
}

if (message.context.program) {
formattedMessage += ' (%' + String(message.context.program) + ')';
}

if (message.context.namespace) {
formattedMessage += ' (#' + String(message.context.namespace) + ')';
}
Expand All @@ -64,7 +68,7 @@ export const createLogFormatter = (configuration: LogFormatterConfigurationType)
logLevel: temporary3,
namespace: temporary4,
package: temporary5,
package: temporary6,
program: temporary6,
...rest
} = message.context;

Expand Down

0 comments on commit e9ba028

Please sign in to comment.