Curt Arnold skrev  den 02-09-2008 19:01:

The suggestion introduces SLF4J into the mix with explanation and goes through a lot of effort to evaluate the class of the calling statement for categorization when the cost might be excessive. It would seem that if you replaced the System.println(...) with a call to something like:
There are many ways to skin a cat.

Your suggestion is simple but throws away all location information. My suggestion is more complex (admitted, the slf4j was a spinal reflex in the material I dug up for this) and slow, but keeps location information

The stack trace investigation is necessary when doing a simple text-replace as you do not know if you are inside a static method. Perhaps a long term effort in this regard, could be developing an Eclipse/Netbeans/Whatever refactoring template which converts System.out/System.err references to log statements?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to