The config file looks OK. Separating into different files per log
level is probably not a good practice, but that is unrelated to the
problem at hand.
You also don't want to write
logger.trace("Trace {} " + randomValue);
but
logger.trace("Trace {}", randomValue);
instead. However, this is also unrelated to the problem at hand.
I suspect that for one reason or another, logback is unable to
compress the log file, possibly because another process is holding a
lock on the file. When this happens, logback will complain by adding a
status message in an internal buffer. To see logback's internal
errors, you should stop printing messages on the console. Instead, add
a status listener which will print status messages generated by
logback. The code is:
LoggerContext loggerContext = (LoggerContext)
LoggerFactory.getILoggerFactory();
...
// additional line of code
loggerContext.getStatusManager().add(new OnConsoleStatusListener());
Also, in your messages consider "hello" as a salutation instead of "Dear sir".
boss134 wrote:
Dear sir,
below part is my complete configuration... includes xml
configuration and java code part
i logging every level in separate log file.....
<configuration>
...
[snip]
boss134
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev