New LogMessageExtractorCheck which writes out TXT report of all loggers
[yangtools.git] / common / checkstyle-logging / src / test / java / org / opendaylight / yangtools / checkstyle / CheckLoggingTestClass.java
index 6a2b170c5efa6cdcbe4c7a681ccf779ff2121121..ba3a4da0678af9927f5c9206488600f6ce577a1b 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.yangtools.checkstyle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+// NOTE:  This test class contains intentional checkstyle issues, for CheckstyleTest
 public class CheckLoggingTestClass {
     final Logger logger = LoggerFactory.getLogger(CheckstyleTest.class);
     private static final java.util.logging.Logger LOG2 = java.util.logging.Logger.getGlobal();
@@ -24,6 +25,9 @@ public class CheckLoggingTestClass {
             System.err.print(e.getMessage());
             logger.debug("foo {}", "bar", e);
             LOG.info("foo {} {}", e.getMessage(), e);
+            // Multi line
+            LOG.info("foo {} "
+                    + "bar {}");
         }
     }
 
@@ -33,5 +37,13 @@ public class CheckLoggingTestClass {
         LOG.warn("foo", string);
         LOG.warn("foo {}", string);
         LOG.warn("foo {}", string, e);
+        LOG.warn(
+            "Unable to parse configuration snapshot from {}. Initial config from {} will be IGNORED in this run. " +
+            "Note that subsequent config files may fail due to this problem. " +
+            "Xml markup in this file needs to be fixed, for detailed information see enclosed exception.",
+            string, string, e);
+        LOG.warn("foo" + string);
+        LOG.warn("foo" + "bar");
+        LOG.warn("foo" + "bar" + "bar");
     }
-}
\ No newline at end of file
+}