incubator-chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yang <>
Subject Re: Deadlock happening in ChukwaDailyRollingFileAppender
Date Fri, 06 Jul 2012 05:21:23 GMT
Hi Abhijit,

SocketAppender serializes LoggingEvent object to the listening port.
In theory, you can get the full logging event without having to depend
on layout.  SocketAdaptor setRecordType by the type defined during
adaptor creation.  It is not possible to setRecordType using
SocketAppender because recordType is Chukwa specific concept.  Log4J
does not know anything about this.  In SocketAdaptor, it is
serializing the log event into a byte array.  It doesn't handle the
Throwable part of the logging message.  This is why it appears as
first line only.  However, if you put in message like:

log.error("this is line 1.\nthis is line 2.");

This will log as 2 lines.  Chukwa probably should handle throwable
part of the logging event, but it doesn't do that today.


On Thu, Jul 5, 2012 at 6:01 PM, Abhijit Dhar <> wrote:
> Hi Eric,
> I tried SocketAppender with SocketAdaptor, but I'm having 3 trouble points:
> First, SocketAppender does not use Pattern Layout. I need to format my logs
> so that I can parse it at the collector end.
> Second, I need to dynamically add the adaptors to the agent with a dynamic
> name for the recordType. How can I do this with SocketAppender? Is there a
> method that I can override( Like, I could override setRecordType() in
> ChukwaDailyRollingFileAppender)
> Third, I dont seem to get multiple lines. I debugged and the chunks on the
> collector side are only getting the first line for a stack trace for
> example. What am I doing wrong?
> My setup is this:
> log4j.appender.J.RemoteHost=localhost
> log4j.appender.J.Port=9095
> And I simple log like logger.error("Expected Test error occured", e);
> Thanks,
> Abhijit
> --
> View this message in context:
> Sent from the Chukwa - Users mailing list archive at

View raw message