[logback-user] Logging encoded google protocol buffers with logback rolling file appender

DaveJohnston dave.johnston at me.com
Fri Aug 24 12:30:25 CEST 2012

Thanks Chris,

That looks like it might work what additional overhead does Anodyzed Onyx
add to the log call?  My system is processing quite a high volume of
traffic, so I wan't to avoid any performance costs.

In my case I don't need to mix readable text with the binary data - my
output file should just be purely binary, so maybe there is a simpler
solution ?

Chris Pratt wrote:
> With the Anodyzed Onyx (http://code.google.com/p/anodyzed) wrapper around
> Logback you can use log.debug("Google Protocol
> Buffer\n{0,binary,dump}",myBuffer); to write a Hex Dump style entry in the
> logs.
>   (*Chris*)
> On Thu, Aug 23, 2012 at 4:25 AM, Dave Johnston <dave.johnston at me.com>
> wrote:
>> Hi,
>> I'd like to log google protocol buffers received by my server to a file,
>> for later offline processing (the data is in a byte[]).  This is
>> something
>> I only do in when a debug mode is enabled, but it is useful for
>> diagnostics.
>> Ideally I'd like to use logback, but it doesn't seem to cater for binary
>> data.
>> I saw this issue: http://jira.qos.ch/browse/LOGBACK-232 which is marked
>> as fix, and is a request for the same thing.  But I can't figure out how
>> to
>> use this with a normal rolling file appender.
>> Does anyone have any examples of doing this?
>> Cheers
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/logback-user
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user

View this message in context: http://old.nabble.com/Logging-encoded-google-protocol-buffers-with-logback-rolling-file-appender-tp34338947p34343526.html
Sent from the Logback User mailing list archive at Nabble.com.

More information about the Logback-user mailing list