On Jul 15, 2012, at 11:31, Ralph Goers <[email protected]> wrote:
> On Jul 15, 2012, at 7:41 AM, Gary Gregory wrote: > >> Hi All, >> >> I have many cases in 1.2 where I log "in bulk". The simplest example would >> be to log all system properties. >> >> Depending on the case, I care (or not) that all log entries in the bulk are >> non-interlaced with other log entries (from other threads). >> >> So I have cases where I log maps, lists, and arrays. With 1.2, I have to >> have my own loops for create log entries. >> >> Any thought of providing additional APIs to do this? Before I work on a >> proposal, I'd like a feel for if this is out of scope for 2.0. >> >> Thank you! > > You just need to create a custom Message. See MapMessage or > ThreadDumpMessage for examples. You could also define a Message that has a > put method to add items to it. When the message is rendered the rendering > would format them however you want but essentially as one String, which is > the only way to guarantee the lines stay together in the log. I'll have to play with that idea. Thank you for the tip. Gary > > Ralph > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
