java - How to replace the usage of System.out or System.err by a logger? -


i have simple if condition in use system.out.println. know how can modify code in order replace usage of system.out logger ?

if(myvar.getdate().equals(20141127) && myvar.getnumber().equals(1)) {                 system.out.println(""); } 

any suggestions ?

thanks

you can use logger utility log details.

have @ apache log4j

the logging simple

log.debug("this debug message"); 

where log instance of logger

for sample code can tutorial


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -