Skip to content

Instantly share code, notes, and snippets.

@turing85
Created July 14, 2024 09:20
Show Gist options
  • Save turing85/2197eee7e16045a136acc19e0d99bd25 to your computer and use it in GitHub Desktop.
Save turing85/2197eee7e16045a136acc19e0d99bd25 to your computer and use it in GitHub Desktop.
log4j2 json configuration for citrus
name=Log4j2PropertiesConfig
status=info
property.LOG_DATEFORMAT_PATTERN=yyyy-MM-dd HH:mm:ss.SSS
property.CONSOLE_LOG_PATTERN=%d{${sys:LOG_DATEFORMAT_PATTERN}} %highlight{%5p} --- [%15.15t] %-40.40c{1.} : %msg%n%throwable
property.FILE_LOG_PATTERN=%d{${sys:LOG_DATEFORMAT_PATTERN}} %5p --- [%15.15t] %-40.40c{1.} : %msg%n%throwable
appender.console.type=Console
#appender.console.layout.pattern=${sys:CONSOLE_LOG_PATTERN}
#appender.console.layout.type=PatternLayout
appender.console.layout.type=JsonLayout
appender.console.layout.compact=true
appender.console.layout.eventEol=true
appender.console.layout.includeTimeMillis=true
appender.console.layout.stacktraceAsString=true
appender.console.name=STDOUT
appender.file.layout.type=PatternLayout
appender.file.layout.pattern=${sys:FILE_LOG_PATTERN}
appender.file.fileName=target/logs/citrus.log
appender.file.type=File
appender.file.append=false
appender.file.name=FILE
rootLogger.appenderRef.stdout.ref=STDOUT
rootLogger.appenderRef.file.ref=FILE
rootLogger.appenderRefs=stdout, file
rootLogger.level=info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment