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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -