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

Alex Vb i8c.alex at gmail.com
Fri Apr 8 07:19:23 CEST 2011


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> 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
> http://qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110408/69e38c41/attachment.html>


More information about the Logback-user mailing list