[logback-user] logging arrays?

Thorbjoern Ravn Andersen ravn at runjva.com
Mon Nov 2 22:20:57 CET 2009

Jeff Jensen skrev:
> OK, I feel ridiculous; and I really thought I did this before with
> Logback/slf4j.  Please give me a LMFGTFY, and I will happily take it! ;-)  I
> have googled, reviews the docs, etc.  The problem is, when logging an array,
> only the first element shows.  Is this WAD - is there a config to get it to
> do all?  Do I have to loop it myself and log each item?
Might you be hitting into a varargs interpretation?  What happens if you 
add more {}'s to your logging string?

If that is the case you might trick the compiler by putting your array 
in a "new Object[1]".

  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"

More information about the Logback-user mailing list