0

am I missing something using this configuration? I thought that root logger would log all events from error level to the bottom one. If I try to log event at info level, there is no output. This config gives me only error leveled logs. I am using slf4j to create logger objects through Logger-factory class.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
 <Appenders>
 <Console name="Console" target="SYSTEM_OUT">
 <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
 </Console>
 </Appenders>
 <Loggers>
 <Root level="error">
 <AppenderRef ref="Console"/>
 </Root>
 </Loggers>
</Configuration>
asked Oct 14, 2018 at 15:48

1 Answer 1

2

For info level logs, change the configuration, in particular Root level to info as show below

<Loggers>
 <Root level="info">
 <AppenderRef ref="Console"/>
 </Root>
</Loggers>

By changing level to info, the program will start logging both info, error logs in the console.

answered Oct 14, 2018 at 15:52
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.