Author: ravn Date: Sun Apr 26 12:37:06 2009 New Revision: 1329 Modified: slf4j/trunk/slf4j-site/src/site/pages/manual.html
Log: reverted coloured code to plain, and added note on log levels in sample program Modified: slf4j/trunk/slf4j-site/src/site/pages/manual.html ============================================================================== --- slf4j/trunk/slf4j-site/src/site/pages/manual.html (original) +++ slf4j/trunk/slf4j-site/src/site/pages/manual.html Sun Apr 26 12:37:06 2009 @@ -36,7 +36,7 @@ the source code. </p> -<!-- <pre class="source">import org.slf4j.Logger; +<pre class="source">import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class HelloWorld { @@ -45,16 +45,6 @@ logger.info("Hello World"); } }</pre> ---> -<pre class="source"><font color="#1773cc">import</font> org.slf4j.Logger; -<font color="#1773cc">import</font> org.slf4j.LoggerFactory; - -<font color="#008b00"><b>public</b></font> <font color="#008b00"><b>class</b></font> HelloWorld { - <font color="#008b00"><b>public</b></font> <font color="#008b00"><b>static</b></font> <font color="#008b00"><b>void</b></font> main(String[] args) { - Logger logger = LoggerFactory.getLogger(HelloWorld.<font color="#008b00"><b>class</b></font>); - logger.info(<font color="#4a6f8b">"Hello World"</font>); - } -}</font></pre> <p>To run this example, you first need to <a href="download.html">download the slf4j distribution</a>, and @@ -105,6 +95,16 @@ question <a href="faq.html#logging_performance">"What is the fastest way of logging?"</a> in the FAQ for more details. </p> + + <p>The "debug" and "info" method names reflect that the logging + can be controlled depending on the usage. Code running in a + production setting does not necessarily have to log as much as + code being analyzed to locate a bug, so if the threshold is set + at "info" the logger.debug message would not be logged, but only + the logger.info message. The complete list is: trace, debug, + info, warn, and error. If in an error situation it is also + possible to attach any Exception with the message, so the + stack trace can be logged too.</p> <h3><a name="swapping" href="#binding">Binding with a logging framework at deployment time</a></h3> _______________________________________________ dev mailing list dev@slf4j.org http://www.slf4j.org/mailman/listinfo/dev