Skip to content

Commit

Permalink
Prettier logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
chmac committed Aug 10, 2024
1 parent 13cfd03 commit 360ca39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ logPackage.setup({
console: new logPackage.ConsoleHandler("DEBUG", {
formatter: function (record) {
const argsString =
record.args.length > 0 ? ` ${JSON.stringify(record.args)}` : "";
record.args.length > 0
? `\n${Deno.inspect(record.args, { colors: true })}`
: "";
return `${record.datetime.toISOString()} [${record.levelName}] ${
record.msg
} ${argsString}`;
},

useColors: true,
useColors: false,
}),
},
loggers: {
Expand Down

0 comments on commit 360ca39

Please sign in to comment.