Project log4j Debugging on --verbose: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
=Procedure= | =Procedure= | ||
Use [[novaordis-utilities]] 4.2 or newer. | Use [[novaordis-utilities]] 4.2 or newer. novaordis-utilities 4.2.0 was the first release that contains <tt>StderrVerboseLogging</tt>. | ||
For more details, see: | |||
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;"> | <blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;"> | ||
Line 18: | Line 18: | ||
</blockquote> | </blockquote> | ||
as follows: | Activate it as follows: | ||
<pre> | |||
import io.novaordis.utilities.logging.StderrVerboseLogging; | |||
... | |||
if (verbose) { | |||
StderrVerboseLogging.enable(); | |||
} | |||
... | |||
</pre> |
Revision as of 01:08, 8 August 2016
Internal
Overview
This is a development pattern that routes log4j logging information to stderr if -v|--verbose command line option is used. Projects that implement it are clad, os-stats, etc.
Procedure
Use novaordis-utilities 4.2 or newer. novaordis-utilities 4.2.0 was the first release that contains StderrVerboseLogging.
For more details, see:
Activate it as follows:
import io.novaordis.utilities.logging.StderrVerboseLogging; ... if (verbose) { StderrVerboseLogging.enable(); } ...