Skip to content

Commit

Permalink
nicer formatting when Log context is used
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed May 6, 2023
1 parent c0ace0a commit e2273ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lavinmq/log_formatter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ require "log"
module LavinMQ
struct JournalLogFormat < Log::StaticFormatter
def run
source(after: " ")
source
context(before: '[', after: ']')
string ' '
message
exception
end
Expand All @@ -13,8 +15,9 @@ module LavinMQ
def run
timestamp
severity
string " "
source(after: " ")
source(before: ' ')
context(before: '[', after: ']')
string ' '
message
exception
end
Expand Down

0 comments on commit e2273ee

Please sign in to comment.