[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.7.0-7-g996ccc7

Gitbot git-noreply at pixie.qos.ch
Fri Sep 14 20:26:10 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SLF4J: Simple Logging Facade for Java".

The branch, master has been updated
       via  996ccc7ca507994465c069554954ecb01890d4d5 (commit)
       via  8efba7f7a89eff0be165636b1b3ff3c5a76887aa (commit)
      from  e96e3290507c8f8bf9f9c1f8811ca9e2f7ac4cd7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=996ccc7ca507994465c069554954ecb01890d4d5
http://github.com/ceki/slf4j/commit/996ccc7ca507994465c069554954ecb01890d4d5

commit 996ccc7ca507994465c069554954ecb01890d4d5
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Fri Sep 14 20:25:30 2012 +0200

    added log file support

diff --git a/pom.xml b/pom.xml
index ba642b2..904e390 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,7 @@
     <cal10n.version>0.7.4</cal10n.version>
     <log4j.version>1.2.17</log4j.version>
     <logback.version>1.0.7</logback.version>
+    <junit.version>4.10</junit.version>
   </properties>
 
   <developers>
@@ -69,7 +70,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <version>${junit.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
index 89d1385..2995b5f 100644
--- a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
+++ b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
@@ -24,7 +24,10 @@
  */
 package org.slf4j.impl;
 
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.InputStream;
+import java.io.PrintStream;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.text.DateFormat;
@@ -105,95 +108,43 @@ import org.slf4j.spi.LocationAwareLogger;
 public class SimpleLogger extends MarkerIgnoringBase {
 
   private static final long serialVersionUID = -632788891211436180L;
-
-  /**
-   * Mark the time when this class gets loaded into memory.
-   */
-  private static long START_TIME = System.currentTimeMillis();
-
   private static final String CONFIGURATION_FILE = "simplelogger.properties";
 
-  /**
-   * All system properties used by <code>SimpleLogger</code> start with this
-   */
-  private static final String systemPrefix = "org.slf4j.simplelogger.";
-
-  /**
-   * Properties loaded from simplelogger.properties
-   */
-  private static final Properties simpleLoggerProps = new Properties();
-
-  /**
-   * Include the instance name in the log message?
-   */
+  private static long START_TIME = System.currentTimeMillis();
+  private static final Properties SIMPLE_LOGGER_PROPS = new Properties();
   private static boolean SHOW_LOG_NAME = true;
-  /**
-   * Include the short name ( last component ) of the logger in the log
-   * message. Defaults to true - otherwise we'll be lost in a flood of
-   * messages without knowing who sends them.
-   */
-  private static boolean SHOW_SHORT_NAME = false;
-  /**
-   * Include the current time in the log message
-   */
+  private static boolean SHOW_SHORT_LOG_NAME = false;
   private static boolean SHOW_DATE_TIME = false;
-
-  /**
-   * The date and time format to use in the log message
-   */
   private static String DATE_TIME_FORMAT_STR = null;
-
-  /**
-   * Include the current thread name in the log message
-   */
   private static boolean SHOW_THREAD_NAME = true;
+  private static String logFile = "System.err";
 
-  /**
-   * The log file to write to. Default is null.
-   */
-  private static String logFile = null;
-  /**
-   * Used to format times.
-   * <p/>
-   * Any code that accesses this object should first obtain a lock on it,
-   * ie use synchronized(dateFormatter); this requirement is
-   * to fix an existing thread safety bug (SimpleDateFormat.format
-   * is not thread-safe).
-   */
   private static DateFormat DATE_FORMATTER = null;
 
-  /**
-   * "Trace" level logging.
-   */
-  public static final int LOG_LEVEL_TRACE = LocationAwareLogger.TRACE_INT;
-  /**
-   * "Debug" level logging.
-   */
-  public static final int LOG_LEVEL_DEBUG = LocationAwareLogger.DEBUG_INT;
-  /**
-   * "Info" level logging.
-   */
-  public static final int LOG_LEVEL_INFO = LocationAwareLogger.INFO_INT;
-  /**
-   * "Warn" level logging.
-   */
-  public static final int LOG_LEVEL_WARN = LocationAwareLogger.WARN_INT;
-  /**
-   * "Error" level logging.
-   */
-  public static final int LOG_LEVEL_ERROR = LocationAwareLogger.ERROR_INT;
+  private static final int LOG_LEVEL_TRACE = LocationAwareLogger.TRACE_INT;
+  private static final int LOG_LEVEL_DEBUG = LocationAwareLogger.DEBUG_INT;
+  private static final int LOG_LEVEL_INFO = LocationAwareLogger.INFO_INT;
+  private static final int LOG_LEVEL_WARN = LocationAwareLogger.WARN_INT;
+  private static final int LOG_LEVEL_ERROR = LocationAwareLogger.ERROR_INT;
 
   /**
-   * Enable all logging levels
+   * All system properties used by <code>SimpleLogger</code> start with this prefix
    */
-  //public static final int LOG_LEVEL_ALL = (LOG_LEVEL_TRACE - 10);
+  public static final String SYSTEM_PREFIX = "org.slf4j.simpleLogger.";
 
-  /**
-   * Enable no logging levels
-   */
-  //public static final int LOG_LEVEL_OFF = (LOG_LEVEL_ERROR + 10);
+  public static final String DEFAULT_LOG_KEY = SYSTEM_PREFIX + "defaultLog";
+  public static final String SHOW_LOG_NAME_KEY = SYSTEM_PREFIX + "showLogName";
+  public static final String SHOW_SHORT_LOG_NAME_KEY = SYSTEM_PREFIX + "showShortLogName";
+  public static final String SHOW_THREAD_NAME_KEY = SYSTEM_PREFIX + "showThreadName";
+  public static final String DATE_TIME_FORMAT_KEY = SYSTEM_PREFIX + "dateTimeFormat";
+  public static final String SHOW_DATE_TIME_KEY = SYSTEM_PREFIX + "showDateTime";
+  public static final String LOG_FILE_KEY = SYSTEM_PREFIX + "logFile";
+
+  public static final String LOG_KEY_PREFIX = SYSTEM_PREFIX + "log.";
 
-  private static int defaultLogLevel = LOG_LEVEL_INFO;
+
+  private static int DEFAULT_LOG_LEVEL = LOG_LEVEL_INFO;
+  private static PrintStream TARGET_STREAM = System.err;
 
   private static String getStringProperty(String name) {
     String prop = null;
@@ -202,7 +153,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
     } catch (SecurityException e) {
       ; // Ignore
     }
-    return (prop == null) ? simpleLoggerProps.getProperty(name) : prop;
+    return (prop == null) ? SIMPLE_LOGGER_PROPS.getProperty(name) : prop;
   }
 
   private static String getStringProperty(String name, String defaultValue) {
@@ -220,6 +171,50 @@ public class SimpleLogger extends MarkerIgnoringBase {
   // Load properties file, if found.
   // Override with system properties.
   static {
+    loadProperties();
+
+
+    String defaultLogLevelString = getStringProperty(DEFAULT_LOG_KEY, null);
+    if (defaultLogLevelString != null)
+      DEFAULT_LOG_LEVEL = stringToLevel(defaultLogLevelString);
+
+    SHOW_LOG_NAME = getBooleanProperty(SHOW_LOG_NAME_KEY, SHOW_LOG_NAME);
+    SHOW_SHORT_LOG_NAME = getBooleanProperty(SHOW_SHORT_LOG_NAME_KEY, SHOW_SHORT_LOG_NAME);
+    SHOW_DATE_TIME = getBooleanProperty(SHOW_DATE_TIME_KEY, SHOW_DATE_TIME);
+    SHOW_THREAD_NAME = getBooleanProperty(SHOW_THREAD_NAME_KEY, SHOW_THREAD_NAME);
+    DATE_TIME_FORMAT_STR = getStringProperty(DATE_TIME_FORMAT_KEY, DATE_TIME_FORMAT_STR);
+
+
+    logFile = getStringProperty(LOG_FILE_KEY, logFile);
+    TARGET_STREAM = computeTargetStream(logFile);
+
+    if (DATE_TIME_FORMAT_STR != null) {
+      try {
+        DATE_FORMATTER = new SimpleDateFormat(DATE_TIME_FORMAT_STR);
+      } catch (IllegalArgumentException e) {
+        Util.report("Bad date format in " + CONFIGURATION_FILE + "; will default to relative time ", e);
+      }
+    }
+  }
+
+  private static PrintStream computeTargetStream(String logFile) {
+    if("System.err".equalsIgnoreCase(logFile))
+      return System.err;
+    else if("System.out".equalsIgnoreCase(logFile)) {
+      return System.out;
+    } else {
+      try {
+        FileOutputStream fos = new FileOutputStream(logFile);
+        PrintStream printStream = new PrintStream(fos);
+        return printStream;
+      } catch (FileNotFoundException e) {
+        Util.report("Could not open [" + logFile + "]. Defaulting to System.err", e);
+        return System.err;
+      }
+    }
+  }
+
+  private static void loadProperties() {
     // Add props from the resource simplelogger.properties
     InputStream in = (InputStream) AccessController.doPrivileged(
             new PrivilegedAction() {
@@ -234,32 +229,12 @@ public class SimpleLogger extends MarkerIgnoringBase {
             });
     if (null != in) {
       try {
-        simpleLoggerProps.load(in);
+        SIMPLE_LOGGER_PROPS.load(in);
         in.close();
       } catch (java.io.IOException e) {
         // ignored
       }
     }
-
-    String defaultLogLevelString = getStringProperty(systemPrefix + "defaultLog", null);
-    if (defaultLogLevelString != null)
-      defaultLogLevel = stringToLevel(defaultLogLevelString);
-
-    SHOW_LOG_NAME = getBooleanProperty(systemPrefix + "showLogName", SHOW_LOG_NAME);
-    SHOW_SHORT_NAME = getBooleanProperty(systemPrefix + "showShortLogName", SHOW_SHORT_NAME);
-    SHOW_DATE_TIME = getBooleanProperty(systemPrefix + "showDateTime", SHOW_DATE_TIME);
-    SHOW_THREAD_NAME = getBooleanProperty(systemPrefix + "showThreadName", SHOW_THREAD_NAME);
-    DATE_TIME_FORMAT_STR = getStringProperty(systemPrefix + "dateTimeFormat", DATE_TIME_FORMAT_STR);
-
-    logFile = getStringProperty(systemPrefix + "logFile", logFile);
-
-    if (DATE_TIME_FORMAT_STR != null) {
-      try {
-        DATE_FORMATTER = new SimpleDateFormat(DATE_TIME_FORMAT_STR);
-      } catch (IllegalArgumentException e) {
-        Util.report("Bad date format in " + CONFIGURATION_FILE + "; will default to relative time ", e);
-      }
-    }
   }
 
 
@@ -281,23 +256,25 @@ public class SimpleLogger extends MarkerIgnoringBase {
   SimpleLogger(String name) {
     this.name = name;
 
-    // Set initial log level
-    this.currentLogLevel = LOG_LEVEL_INFO;
-
-    // Set log level from properties
-    String lvl = getStringProperty(systemPrefix + "log." + name);
-    int i = String.valueOf(name).lastIndexOf(".");
-    while (null == lvl && i > -1) {
-      name = name.substring(0, i);
-      lvl = getStringProperty(systemPrefix + "log." + name);
-      i = String.valueOf(name).lastIndexOf(".");
+    String levelString = recursivelyComputeLevelString();
+    if (levelString != null) {
+      this.currentLogLevel = stringToLevel(levelString);
+    } else {
+      this.currentLogLevel = DEFAULT_LOG_LEVEL;
     }
 
-    if (null == lvl) {
-      lvl = getStringProperty(systemPrefix + "defaultlog");
-    }
+  }
 
-    this.currentLogLevel = stringToLevel(lvl);
+  String recursivelyComputeLevelString() {
+    String tempName = name;
+    String levelString = null;
+    int indexOfLastDot = tempName.length();
+    while ((levelString == null) && (indexOfLastDot > -1)) {
+      tempName = tempName.substring(0, indexOfLastDot);
+      levelString = getStringProperty(LOG_KEY_PREFIX + tempName, null);
+      indexOfLastDot = String.valueOf(tempName).lastIndexOf(".");
+    }
+    return levelString;
   }
 
   private static int stringToLevel(String lvl) {
@@ -371,7 +348,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
     buf.append(' ');
 
     // Append the name of the log instance if so configured
-    if (SHOW_SHORT_NAME) {
+    if (SHOW_SHORT_LOG_NAME) {
       if (shortLogName == null) shortLogName = computeShortName();
       buf.append(String.valueOf(shortLogName)).append(" - ");
     } else if (SHOW_LOG_NAME) {
@@ -381,12 +358,17 @@ public class SimpleLogger extends MarkerIgnoringBase {
     // Append the message
     buf.append(message);
 
-    System.err.println(buf.toString());
+    write(buf, t);
+
+  }
+
+  void write(StringBuffer buf, Throwable t) {
+    TARGET_STREAM.println(buf.toString());
     // Append stack trace if not null
     if (t != null) {
-      t.printStackTrace(System.err);
+      t.printStackTrace(TARGET_STREAM);
     }
-    System.err.flush();
+    TARGET_STREAM.flush();
   }
 
   private String getFormattedDate() {
diff --git a/slf4j-simple/src/test/java/org/slf4j/impl/SimpleLoggerTest.java b/slf4j-simple/src/test/java/org/slf4j/impl/SimpleLoggerTest.java
new file mode 100644
index 0000000..d762c13
--- /dev/null
+++ b/slf4j-simple/src/test/java/org/slf4j/impl/SimpleLoggerTest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2004-2012 QOS.ch
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free  of charge, to any person obtaining
+ * a  copy  of this  software  and  associated  documentation files  (the
+ * "Software"), to  deal in  the Software without  restriction, including
+ * without limitation  the rights to  use, copy, modify,  merge, publish,
+ * distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ * permit persons to whom the Software  is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The  above  copyright  notice  and  this permission  notice  shall  be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+package org.slf4j.impl;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNull;
+
+public class SimpleLoggerTest {
+
+  String A_KEY = SimpleLogger.LOG_KEY_PREFIX+"a";
+
+  @Before public void before() {
+    System.setProperty(A_KEY, "info");
+  }
+
+  @After public void after() {
+    System.clearProperty(A_KEY);
+  }
+
+  @Test
+  public void loggerNameWithNoDots_WithLevel() {
+    SimpleLogger simpleLogger = new SimpleLogger("a");
+    assertEquals("info", simpleLogger.recursivelyComputeLevelString());
+  }
+
+  @Test
+  public void loggerNameWithOneDotShouldInheritFromParent() {
+    SimpleLogger simpleLogger = new SimpleLogger("a.b");
+    assertEquals("info", simpleLogger.recursivelyComputeLevelString());
+  }
+
+
+  @Test
+  public void loggerNameWithNoDots_WithNoSetLevel() {
+    SimpleLogger simpleLogger = new SimpleLogger("x");
+    assertNull(simpleLogger.recursivelyComputeLevelString());
+  }
+
+  @Test
+  public void loggerNameWithOneDot_NoSetLevel() {
+    SimpleLogger simpleLogger = new SimpleLogger("x.y");
+    assertNull(simpleLogger.recursivelyComputeLevelString());
+  }
+
+
+}

http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=8efba7f7a89eff0be165636b1b3ff3c5a76887aa
http://github.com/ceki/slf4j/commit/8efba7f7a89eff0be165636b1b3ff3c5a76887aa

commit 8efba7f7a89eff0be165636b1b3ff3c5a76887aa
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Fri Sep 14 19:25:04 2012 +0200

    have all tests pass

diff --git a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
index 0d61714..89d1385 100644
--- a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
+++ b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
@@ -44,30 +44,30 @@ import org.slf4j.spi.LocationAwareLogger;
  * for all defined loggers, to the console ({@code System.err}).
  * The following system properties are supported to configure the behavior of this logger:</p>
  * <ul>
- * <li><code>org.slf4j.simplelogger.defaultlog</code> -
+ * <li><code>org.slf4j.simpleLogger.defaultLog</code> -
  * Default logging detail level for all instances of SimpleLogger.
  * Must be one of ("trace", "debug", "info", "warn", or "error").
  * If not specified, defaults to "info". </li>
- * <li><code>org.slf4j.simplelogger.log.xxxxx</code> -
+ * <li><code>org.slf4j.simpleLogger.log.xxxxx</code> -
  * Logging detail level for a SimpleLogger instance named "xxxxx".
  * Must be one of ("trace", "debug", "info", "warn", or "error").
  * If not specified, the default logging detail level is used.</li>
- * <li><code>org.slf4j.simplelogger.showdatetime</code> -
+ * <li><code>org.slf4j.simpleLogger.showDateTime</code> -
  * Set to <code>true</code> if you want the current date and time
  * to be included in output messages. Default is <code>true</code></li>
- * <li><code>org.slf4j.simplelogger.dateTimeFormat</code> -
+ * <li><code>org.slf4j.simpleLogger.dateTimeFormat</code> -
  * The date and time format to be used in the output messages.
  * The pattern describing the date and time format is the same that is
  * used in <code>java.text.SimpleDateFormat</code>. If the format is not
- * specified or is invalid, the number of milliseonds since start up will be output.
+ * specified or is invalid, the number of milliseconds since start up will be output.
  * </li>
- * <li><code>org.slf4j.simplelogger.showthreadname</code> -
+ * <li><code>org.slf4j.simpleLogger.showThreadName</code> -
  * Set to <code>true</code> if you want to output the current thread name.
  * Defaults to <code>true</code>.</li>
- * <li><code>org.slf4j.simplelogger.showlogname</code> -
+ * <li><code>org.slf4j.simpleLogger.showLogName</code> -
  * Set to <code>true</code> if you want the Logger instance name to be
  * included in output messages. Defaults to <code>true</code>.</li>
- * <li><code>org.slf4j.simplelogger.showShortLogname</code> -
+ * <li><code>org.slf4j.simpleLogger.showShortLogName</code> -
  * Set to <code>true</code> if you want the last component of the name to be
  * included in output messages. Defaults to <code>false</code>.</li>
  * </ul>
@@ -241,20 +241,24 @@ public class SimpleLogger extends MarkerIgnoringBase {
       }
     }
 
-    SHOW_LOG_NAME = getBooleanProperty(systemPrefix + "showlogname", SHOW_LOG_NAME);
-    SHOW_SHORT_NAME = getBooleanProperty(systemPrefix + "showShortLogname", SHOW_SHORT_NAME);
-    SHOW_DATE_TIME = getBooleanProperty(systemPrefix + "showdatetime", SHOW_DATE_TIME);
-    SHOW_THREAD_NAME = getBooleanProperty(systemPrefix + "showthreadname", SHOW_THREAD_NAME);
-    DATE_TIME_FORMAT_STR = getStringProperty(systemPrefix + "dateTimeFormat", DATE_TIME_FORMAT_STR);
-    logFile = getStringProperty(systemPrefix + "logFile", logFile);
-    String defaultLogLevelString = getStringProperty(systemPrefix + "defaultlog", null);
+    String defaultLogLevelString = getStringProperty(systemPrefix + "defaultLog", null);
     if (defaultLogLevelString != null)
       defaultLogLevel = stringToLevel(defaultLogLevelString);
 
-    try {
-      DATE_FORMATTER = new SimpleDateFormat(DATE_TIME_FORMAT_STR);
-    } catch (IllegalArgumentException e) {
-      Util.report("Bad date format in " + CONFIGURATION_FILE + "; will default to relative time ", e);
+    SHOW_LOG_NAME = getBooleanProperty(systemPrefix + "showLogName", SHOW_LOG_NAME);
+    SHOW_SHORT_NAME = getBooleanProperty(systemPrefix + "showShortLogName", SHOW_SHORT_NAME);
+    SHOW_DATE_TIME = getBooleanProperty(systemPrefix + "showDateTime", SHOW_DATE_TIME);
+    SHOW_THREAD_NAME = getBooleanProperty(systemPrefix + "showThreadName", SHOW_THREAD_NAME);
+    DATE_TIME_FORMAT_STR = getStringProperty(systemPrefix + "dateTimeFormat", DATE_TIME_FORMAT_STR);
+
+    logFile = getStringProperty(systemPrefix + "logFile", logFile);
+
+    if (DATE_TIME_FORMAT_STR != null) {
+      try {
+        DATE_FORMATTER = new SimpleDateFormat(DATE_TIME_FORMAT_STR);
+      } catch (IllegalArgumentException e) {
+        Util.report("Bad date format in " + CONFIGURATION_FILE + "; will default to relative time ", e);
+      }
     }
   }
 
diff --git a/slf4j-simple/src/test/resources/simplelogger.properties b/slf4j-simple/src/test/resources/simplelogger.properties
index dc9d4f0..8ab1740 100644
--- a/slf4j-simple/src/test/resources/simplelogger.properties
+++ b/slf4j-simple/src/test/resources/simplelogger.properties
@@ -4,31 +4,31 @@
 # Default logging detail level for all instances of SimpleLogger.
 # Must be one of ("trace", "debug", "info", "warn", or "error").
 # If not specified, defaults to "info".
-#org.slf4j.simplelogger.defaultlog=info
+#org.slf4j.simpleLogger.defaultLog=info
 
 # Logging detail level for a SimpleLogger instance named "xxxxx".
 # Must be one of ("trace", "debug", "info", "warn", or "error").
 # If not specified, the default logging detail level is used.
-#org.slf4j.simplelogger.log.xxxxx=
+#org.slf4j.simpleLogger.log.xxxxx=
 
 # Set to true if you want the current date and time to be included in output messages.
 # Default is false, and will output the number of milliseconds elapsed since startup.
-#org.slf4j.simplelogger.showdatetime=false
+#org.slf4j.simpleLogger.showDateTime=false
 
 # The date and time format to be used in the output messages.
 # The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
 # If the format is not specified or is invalid, the default format is used.
 # The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
-#org.slf4j.simplelogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
 
 # Set to true if you want to output the current thread name.
 # Defaults to true.
-#org.slf4j.simplelogger.showthreadname=true
+#org.slf4j.simpleLogger.showThreadName=true
 
 # Set to true if you want the Logger instance name to be included in output messages.
 # Defaults to true.
-#org.slf4j.simplelogger.showlogname=true
+#org.slf4j.simpleLogger.showLogName=true
 
 # Set to true if you want the last component of the name to be included in output messages.
 # Defaults to false.
-#org.slf4j.simplelogger.showShortLogname=false
+#org.slf4j.simpleLogger.showShortLogName=false

-----------------------------------------------------------------------

Summary of changes:
 pom.xml                                            |    3 +-
 .../src/main/java/org/slf4j/impl/SimpleLogger.java |  224 +++++++++-----------
 .../test/java/org/slf4j/impl/SimpleLoggerTest.java |   64 +++---
 .../src/test/resources/simplelogger.properties     |   14 +-
 4 files changed, 144 insertions(+), 161 deletions(-)
 copy slf4j-jdk14/src/test/java/org/slf4j/impl/PerfTest.java => slf4j-simple/src/test/java/org/slf4j/impl/SimpleLoggerTest.java (51%)


hooks/post-receive
-- 
SLF4J: Simple Logging Facade for Java


More information about the slf4j-dev mailing list