[logback-user] Log4j LoggingEvent

Greg Flex greg.flex at gmail.com
Thu May 14 02:23:09 CEST 2009


Thanks Ceki,
This works for me. I tested and asyncAppender does what I wanted.
Thanks.
I'd like to ask you, however, if there's a way to add at the end of a
Throwable information a semicolon or something.
I have my file appender configure with PatternLayout as follow:
<layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d; [%t]; %-5p; %c;
%m;%n"/>
</layout>
As you can see everything is separated by a semicolon. This works for me
because I use MS Excel to open my log files.
Most of the columns are aligned except for the "exception" one. How can I
add a semicolon to the end of exception string so I can use
it as a delimiter........
Can this even be done?
Thanks
Greg.




On Wed, May 13, 2009 at 10:37 AM, Ceki Gulcu <ceki at qos.ch> wrote:

>
>
> Greg Flex wrote:
>
>> Hi Ceki,
>> It is (kind of) clear. The only part I have problems with is: "...Place
>> logging events in a queue, and if the queue becomes full, drop new
>> events..."
>> How exactly I'd do this? Do I have to implement some method that "drops
>> new events if the queue becomes full" or there's already
>> something built-in.
>>
>
> You would need to modify AsyncAppender so that instead of blocking, it
> drops events. I would think that it would be a fairly easy modification to
> make.
>
>  I know that (From the Log4j Manual: "...If however the queue is full, then
>> AsyncAppender.append() will not return until free space becomes available."
>> ) So if the queue becomes full the dispatcher thread will try to free the
>> space by removing the oldest events from the queue and dispatch them to each
>> attached appender but if the only appender is the SocketAppender that can't
>> process anything at the moment, since
>> there's no comunication to the server, what's going to happend?
>>
>
> Events will be dropped. (You can't have your cake and eat it too.)
>
>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for
> Java.
> http://logback.qos.ch
> _______________________________________________
> 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/20090513/7fbea51d/attachment.htm>


More information about the Logback-user mailing list