Is it possible to disable line wrapping? #533
Answered
by
darkfrog26
jackkoenig
asked this question in
Q&A
|
Basically the question in the title. I have a project using scribe and I'd like for the things I log that don't contain newlines to be printed without newlines (for parsing purposes). Is it possible to disable the automatic line wrapping somehow? Thanks! |
Answered by
darkfrog26
Dec 6, 2023
Replies: 1 comment 1 reply
|
@jackkoenig absolutely. That's just the default formatter. When you configure your logging you can either create your own formatter or use one of the existing options. The default is 'advanced': https://github.com/outr/scribe/blob/master/core/shared/src/main/scala/scribe/format/Formatter.scala#L51, but if you don't want multi-line I'd recommend using Logger
.root
.clearHandlers()
.withHandler(minimumLevel = Some(Level.Info), formatter = Formatter.enhanced)
.replace() |
1 reply
Answer selected by
jackkoenig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jackkoenig absolutely. That's just the default formatter. When you configure your logging you can either create your own formatter or use one of the existing options. The default is 'advanced': https://github.com/outr/scribe/blob/master/core/shared/src/main/scala/scribe/format/Formatter.scala#L51, but if you don't want multi-line I'd recommend using
enhanced: