# Root logger option
rootLogger.level = ${env:LOG_LEVEL:-info}
rootLogger.appenderRef.stdout.ref = stdout

# Avoid warn messages from milton standard filter, as they
# also appear whenever the user makes a mistake
logger.spark.name = spark.http
logger.spark.level = warn
logger.milton.name = io.milton.http
logger.milton.level = warn
logger.milton-filter.name = io.milton.http.StandardFilter
logger.milton-filter.level = error
logger.graph.name = org.apache.jena.sparql.util.graph
logger.graph.level = error

# Direct log messages to stdout
appender.stdout.type = Console
appender.stdout.name = stdout
appender.stdout.target = System.out
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %m%n

# Audit
logger.audit.name = audit
logger.audit.level = trace
logger.audit.additivity = false
logger.audit.appenderRef.audit-console.ref = audit-console
logger.audit.appenderRef.audit-file.ref = audit-file

appender.audit-console.type = Console
appender.audit-console.name = audit-console
appender.audit-console.filter.threshold.type = ThresholdFilter
appender.audit-console.filter.threshold.level = trace
appender.audit-console.target = System.out
appender.audit-console.layout.type = JsonTemplateLayout
appender.audit-console.layout.eventTemplateUri = classpath:LogstashJsonEventLayoutV1.json

appender.audit-file.type = RollingFile
appender.audit-file.name = audit-file
appender.audit-file.filter.threshold.type = ThresholdFilter
appender.audit-file.filter.threshold.level = trace
appender.audit-file.fileName = ${env:AUDIT_LOG_ROOT:-data/audit}/audit.log
appender.audit-file.filePattern = ${env:AUDIT_LOG_ROOT:-data/audit}/audit.%d{yyyy-MM-dd}.log
appender.audit-file.layout.type = JsonTemplateLayout
appender.audit-file.layout.eventTemplateUri = classpath:LogstashJsonEventLayoutV1.json
appender.audit-file.policies.type = Policies
appender.audit-file.policies.time.type = TimeBasedTriggeringPolicy
appender.audit-file.strategy.type = DefaultRolloverStrategy
appender.audit-file.strategy.max = 50
