diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-05-03 11:41:04 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2024-05-06 14:21:26 +0200 |
commit | 90a5df59eddccf630deec66f8d487dd1d69114a9 (patch) | |
tree | fc5498ee6a19c70ab27077e73b146342a634d065 /src/main/resources | |
parent | 9688ddf5c73288621cb431052196d0e7cae6080c (diff) | |
download | sonar-scanner-cli-90a5df59eddccf630deec66f8d487dd1d69114a9.tar.gz sonar-scanner-cli-90a5df59eddccf630deec66f8d487dd1d69114a9.zip |
SCANCLI-146 Log using slf4j + logback
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/logback.xml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..0a76e8f --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE configuration> + +<configuration scan="false"> + <import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/> + <import class="ch.qos.logback.core.ConsoleAppender"/> + + <appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender"> + <target>System.err</target> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>ERROR</level> + </filter> + <encoder class="PatternLayoutEncoder"> + <pattern>%date{HH:mm:ss.SSS} %-5level %msg%n</pattern> + </encoder> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <target>System.out</target> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>TRACE</level> + <onMatch>ACCEPT</onMatch> + </filter> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + </filter> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + </filter> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>WARN</level> + <onMatch>ACCEPT</onMatch> + </filter> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>DENY</onMatch> + </filter> + <encoder class="PatternLayoutEncoder"> + <pattern>%date{HH:mm:ss.SSS} %-5level %msg%n</pattern> + </encoder> + </appender> + + <root level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="STDERR"/> + </root> + +</configuration> |