Skip to content

Commit

Permalink
Synchronize log outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
testersen committed Nov 24, 2023
1 parent 47325ea commit d7ec2cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ class Layout(
private val theme: Theme,
private val configuration: AutoconfLogbackConfiguration
) : LayoutBase<ILoggingEvent>() {
override fun doLayout(event: ILoggingEvent) = try {
theme.doLayout(transformLoggingEventToPayload(event, configuration))
} catch (ex: Throwable) {
if (configuration.layoutDebug) ex.printStackTrace()
throw ex
override fun doLayout(event: ILoggingEvent) = synchronized(this) {
try {
theme.doLayout(transformLoggingEventToPayload(event, configuration))
} catch (ex: Throwable) {
if (configuration.layoutDebug) ex.printStackTrace()
throw ex
}
}
}

0 comments on commit d7ec2cb

Please sign in to comment.