[logback-user] multiple web apps tomcat rolling file appender
Aleksander Kamenik
aleksander.kamenik at gmail.com
Fri Mar 24 10:43:54 CET 2017
Hi!
I'm having trouble with several web apps logging to a single rolling
file appender in one JVM (Tomcat 8.0) without prudent mode. I've tried
several setups with logback.xml configurations however no matter what
I do I get apps overwriting already rolled over files.
For testing I've set rollover to each minute and getting apps to
overwrite already rolled over files is trivial. Reading the manual
though I understand this should work just fine provided all the apps
are using the same JVM and therefore the same appender.
This does not seem to be the case though. During startup I see each
app log "AppenderAction - Naming appender as [COMMON]" for example. I
presume this means every app creates their own appender instead of
reusing the existing one.
The slf4j and logback jar files are located in tomcat's lib directory
as is the logback.xml file. I've tried context based log separation
too with shared logback.xml as well as per app logback.xml but the
result for shared appender is always the same.
I have a feeling I'm missing something obvious and important here.
Regards,
--
Aleksander Kamenik
More information about the logback-user
mailing list