[logback-user] Multiple web-applications logging to same file

Ceki Gulcu ceki at qos.ch
Fri Apr 8 08:58:02 CEST 2011


Hi Alex,


Thank you for the heads up. I was not aware of deadlocks occuring in 
prudent mode. Can you tell us more about your environment, OS version, 
file system sharing technology, etc? For example, what do you man by 
"ownership of the drive"?

Cheers,
--
Ceki

QOS.ch, main sponsor of cal10n, logback, mistletoe and slf4j open source
projects, is looking to hire talented software engineers. For
further details, see http://logback.qos.ch/job.html

On 08.04.2011 07:19, Alex Vb wrote:
> Just a heads up: we had a similar usecase at a client, but unfortunatly
> they were using a windows cluster where one node owned the shared drive
> where the logs had to be written to. The problem was that when you
> switched ownership of the drive while the application was logging in
> prudent mode, the file lock could not always be released. This means the
> next time you tried to log, the blocking lock() call would hang
> infinitely. After this happened a few times (caught it before production
> luckily), we wrote custom appenders with non-blocking locking and now we
> usually log asynchronously which avoids the problem alltogether (no
> prudent mode needed).
>
> On 7 April 2011 18:44, Ceki Gulcu <ceki at qos.ch <mailto:ceki at qos.ch>> wrote:
>
>
>     As David mentioned prudent mode caters for this use case. It should
>     should work nicely.
>
>     BTW, I did not see get the original message from "LogbackUser"
>     apparently posted from nabble.
>
>     --
>     Ceki
>
>     QOS.ch, main sponsor of cal10n, logback and slf4j open source
>     projects, is looking to hire talented software engineers. For
>     further details, see http://logback.qos.ch/job.html
>
>
>
>     On 07.04.2011 17:56, David Roussel wrote:
>
>
>         Use prudent mode -
>         http://logback.qos.ch/manual/appenders.html#FileAppender
>
>
>
>         LogbackUser wrote:
>
>
>             Are there any configuration properties through which multiple
>             web-applications using logback could be configured to log to
>             the same log
>             file? This is taking into consideration that the messages
>             would be logged
>             concurrently without losing any messages.
>
>             The reason I ask this question is that - we have a clustered
>             environment
>             of glassfish server instances where the same web application
>             is installed
>             on all the server instances in the cluster.
>
>
>
>     _______________________________________________
>     Logback-user mailing list
>     Logback-user at qos.ch <mailto:Logback-user at qos.ch>
>     http://qos.ch/mailman/listinfo/logback-user
>
>
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user


-- 
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, 
is looking to hire talented software engineers. For further details, see 
http://logback.qos.ch/job.html



More information about the Logback-user mailing list