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
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
lang-java