logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1611954 - /logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml
Date Sat, 19 Jul 2014 20:02:54 GMT
Author: mattsicker
Date: Sat Jul 19 20:02:54 2014
New Revision: 1611954

URL: http://svn.apache.org/r1611954
Log:
Use "private static final" in examples.

Modified:
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml?rev=1611954&r1=1611953&r2=1611954&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml Sat Jul 19 20:02:54 2014
@@ -48,7 +48,7 @@
 import org.apache.logging.log4j.Logger;
 
 public class HelloWorld {
-    private static Logger logger = LogManager.getLogger("HelloWorld");
+    private static final Logger logger = LogManager.getLogger("HelloWorld");
     public static void main(String[] args) {
         logger.info("Hello, World!");
     }
@@ -128,13 +128,13 @@ logger.printf(Level.INFO, "Logging in us
             <pre class="prettyprint linenums">package org.apache.test;
 
 public class MyTest {
-    private static Logger logger = LogManager.getLogger(MyTest.class.getName());
+    private static final Logger logger = LogManager.getLogger(MyTest.class.getName());
 }
             </pre>
             <pre class="prettyprint linenums">package org.apache.test;
 
 public class MyTest {
-    private static Logger logger = LogManager.getLogger();
+    private static final Logger logger = LogManager.getLogger();
 }
             </pre>
           </subsection>



Mime
View raw message