logging - log4j debug message configuration -
i able use logger simple call:
logger.debug("blablablalbal");
it configured xml file , writes txt.
problem is:
looping on int values in large array , therefore output becomes extremely long in terms of lines used. example:
for(int = 0; < largearray.length; i++){ logger.debug(largearray[i]) }
i know use:
for(int = 0; < largearray.length; i++){ system.out.print(largearray[i]) }
but want have , utilize logger task. know how "imitate" system.out.print() log4j?
use arrays.tostring()
(java 5 or above)
logger.debug(arrays.tostring(largearray)); for(int = 0; < largearray.length; i++){ ... }
Comments
Post a Comment