I am using Tinylog for logging everything in my java application. I capture all the exceptions and logs them.
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-api</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-impl</artifactId>
<version>2.2.1</version>
</dependency>
I am writing the logs on Console as well as on File. Here is my tinylog.properties
file
writer1= console
writer2 = rolling file
writer2.file = /var/log/oozie-monitor-log/monitor-{count}.log
writer2.charset = UTF-8
writer2.append = true
writer2.buffered = false
writer2.backups = 15
#writer1.level = debug
#writer2.level = debug
writer2.policies = daily
writer1.format = {date: HH:mm:ss.SSS} {level}: {message}
writer2.format = {date: HH:mm:ss.SSS} {level}: {message}
Now the issue is that there are some system error and warning that is not getting captured by Tinylog. For example I see below logs on the Console but these logs are available in log file
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/neeleshnirmal/.m2/repository/org/slf4j/slf4j-simple/1.6.6/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/neeleshnirmal/.m2/repository/org/slf4j/slf4j-log4j12/1.6.6/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
So my question is how can configure Tinylog to capture the System error stream also?