[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_0.9.30-47-g9df2438

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Oct 26 08:04:21 CEST 2011


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 "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  9df24380d7a814b6db372781c520a1a9bf29b15b (commit)
      from  dea82f92852be5f4c191ebb06ff5c8254485428b (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=logback.git;a=commit;h=9df24380d7a814b6db372781c520a1a9bf29b15b
http://github.com/ceki/logback/commit/9df24380d7a814b6db372781c520a1a9bf29b15b

commit 9df24380d7a814b6db372781c520a1a9bf29b15b
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Oct 26 08:03:52 2011 +0200

    indentation changes only

diff --git a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java
index 6c21cf0..0b70287 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java
@@ -1,64 +1,64 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.core.pattern.parser;
-
-import java.util.List;
-
-public class SimpleKeywordNode extends FormattingNode {
-
-  List<String> optionList;
-
-  SimpleKeywordNode(Object value) {
-    super(Node.SIMPLE_KEYWORD, value);
-  }
-
-  protected  SimpleKeywordNode(int type, Object value) {
-    super(type, value);
-  }
-
-  public List<String> getOptions() {
-    return optionList;
-  }
-
-  public void setOptions(List<String> optionList) {
-    this.optionList = optionList;
-  }
-
-  public boolean equals(Object o) {
-    // System.out.println("Keyword.equals()");
-    if (!super.equals(o)) {
-      return false;
-    }
-
-    if (!(o instanceof SimpleKeywordNode)) {
-      return false;
-    }
-    SimpleKeywordNode r = (SimpleKeywordNode) o;
-
-    return (optionList != null ? optionList.equals(r.optionList)
-        : r.optionList == null);
-  }
-
-  public String toString() {
-    StringBuffer buf = new StringBuffer();
-    if (optionList == null) {
-      buf.append("KeyWord(" + value + "," + formatInfo + ")");
-    } else {
-      buf.append("KeyWord(" + value + ", " + formatInfo + "," + optionList
-          + ")");
-    }
-    buf.append(printNext());
-    return buf.toString();
-  }
-}
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.core.pattern.parser;
+
+import java.util.List;
+
+public class SimpleKeywordNode extends FormattingNode {
+
+  List<String> optionList;
+
+  SimpleKeywordNode(Object value) {
+    super(Node.SIMPLE_KEYWORD, value);
+  }
+
+  protected  SimpleKeywordNode(int type, Object value) {
+    super(type, value);
+  }
+
+  public List<String> getOptions() {
+    return optionList;
+  }
+
+  public void setOptions(List<String> optionList) {
+    this.optionList = optionList;
+  }
+
+  public boolean equals(Object o) {
+    // System.out.println("Keyword.equals()");
+    if (!super.equals(o)) {
+      return false;
+    }
+
+    if (!(o instanceof SimpleKeywordNode)) {
+      return false;
+    }
+    SimpleKeywordNode r = (SimpleKeywordNode) o;
+
+    return (optionList != null ? optionList.equals(r.optionList)
+        : r.optionList == null);
+  }
+
+  public String toString() {
+    StringBuffer buf = new StringBuffer();
+    if (optionList == null) {
+      buf.append("KeyWord(" + value + "," + formatInfo + ")");
+    } else {
+      buf.append("KeyWord(" + value + ", " + formatInfo + "," + optionList
+          + ")");
+    }
+    buf.append(printNext());
+    return buf.toString();
+  }
+}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/property/FileExistsPropertyDefiner.java b/logback-core/src/main/java/ch/qos/logback/core/property/FileExistsPropertyDefiner.java
index 89b16e7..2f108ee 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/property/FileExistsPropertyDefiner.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/property/FileExistsPropertyDefiner.java
@@ -1,31 +1,31 @@
-package ch.qos.logback.core.property;
-
-import ch.qos.logback.core.PropertyDefinerBase;
-import java.io.File;
-
-/**
- * @author Ceki Gücü
- */
-public class FileExistsPropertyDefiner extends PropertyDefinerBase {
-
-  String path;
-
-  public String getPath() {
-    return path;
-  }
-
-  public void setPath(String path) {
-    this.path = path;
-  }
-
-  public String getPropertyValue() {
-    if(path == null)
-      return "false";
-    File file = new File(path);
-    System.out.println(file.getAbsolutePath());
-    if(file.exists())
-      return "true";
-    else
-    return "false";
-  }
-}
+package ch.qos.logback.core.property;
+
+import ch.qos.logback.core.PropertyDefinerBase;
+import java.io.File;
+
+/**
+ * @author Ceki Gücü
+ */
+public class FileExistsPropertyDefiner extends PropertyDefinerBase {
+
+  String path;
+
+  public String getPath() {
+    return path;
+  }
+
+  public void setPath(String path) {
+    this.path = path;
+  }
+
+  public String getPropertyValue() {
+    if(path == null)
+      return "false";
+    File file = new File(path);
+    System.out.println(file.getAbsolutePath());
+    if(file.exists())
+      return "true";
+    else
+    return "false";
+  }
+}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/status/StatusChecker.java b/logback-core/src/main/java/ch/qos/logback/core/status/StatusChecker.java
index 18f81cc..d9e3d2c 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/status/StatusChecker.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/status/StatusChecker.java
@@ -1,119 +1,119 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.core.status;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreConstants;
-
-import static ch.qos.logback.core.status.StatusUtil.filterStatusListByTimeThreshold;
-
-public class StatusChecker {
-
-  StatusManager sm;
-
-  public StatusChecker(StatusManager sm) {
-    this.sm = sm;
-  }
-
-  public StatusChecker(Context context) {
-    this.sm = context.getStatusManager();
-  }
-
-  public boolean hasXMLParsingErrors(long threshold) {
-    return containsMatch(threshold, Status.ERROR, CoreConstants.XML_PARSING);
-  }
-
-  public boolean noXMLParsingErrorsOccurred(long threshold) {
-    return !hasXMLParsingErrors(threshold);
-  }
-
-  public int getHighestLevel(long threshold) {
-    List<Status> filteredList = filterStatusListByTimeThreshold(sm.getCopyOfStatusList(), threshold);
-    int maxLevel = Status.INFO;
-    for (Status s : filteredList) {
-      if (s.getLevel() > maxLevel)
-        maxLevel = s.getLevel();
-    }
-    return maxLevel;
-  }
-
-  public boolean isErrorFree(long threshold) {
-    return Status.ERROR > getHighestLevel(threshold);
-  }
-
-  public boolean containsMatch(long threshold, int level, String regex) {
-    List<Status> filteredList = filterStatusListByTimeThreshold(sm.getCopyOfStatusList(), threshold);
-    Pattern p = Pattern.compile(regex);
-
-    for (Status status : filteredList) {
-      if (level != status.getLevel()) {
-        continue;
-      }
-      String msg = status.getMessage();
-      Matcher matcher = p.matcher(msg);
-      if (matcher.lookingAt()) {
-        return true;
-      }
-    }
-    return false;
-
-  }
-
-  public boolean containsMatch(int level, String regex) {
-    return containsMatch(0, level, regex);
-  }
-
-  public boolean containsMatch(String regex) {
-    Pattern p = Pattern.compile(regex);
-    for (Status status : sm.getCopyOfStatusList()) {
-      String msg = status.getMessage();
-      Matcher matcher = p.matcher(msg);
-      if (matcher.lookingAt()) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  public int matchCount(String regex) {
-    int count = 0;
-    Pattern p = Pattern.compile(regex);
-    for (Status status : sm.getCopyOfStatusList()) {
-      String msg = status.getMessage();
-      Matcher matcher = p.matcher(msg);
-      if (matcher.lookingAt()) {
-        count++;
-      }
-    }
-    return count;
-  }
-
-  public boolean containsException(Class exceptionType) {
-    Iterator stati = sm.getCopyOfStatusList().iterator();
-    while (stati.hasNext()) {
-      Status status = (Status) stati.next();
-      Throwable t = status.getThrowable();
-      if (t != null && t.getClass().getName().equals(exceptionType.getName())) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-}
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.core.status;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.CoreConstants;
+
+import static ch.qos.logback.core.status.StatusUtil.filterStatusListByTimeThreshold;
+
+public class StatusChecker {
+
+  StatusManager sm;
+
+  public StatusChecker(StatusManager sm) {
+    this.sm = sm;
+  }
+
+  public StatusChecker(Context context) {
+    this.sm = context.getStatusManager();
+  }
+
+  public boolean hasXMLParsingErrors(long threshold) {
+    return containsMatch(threshold, Status.ERROR, CoreConstants.XML_PARSING);
+  }
+
+  public boolean noXMLParsingErrorsOccurred(long threshold) {
+    return !hasXMLParsingErrors(threshold);
+  }
+
+  public int getHighestLevel(long threshold) {
+    List<Status> filteredList = filterStatusListByTimeThreshold(sm.getCopyOfStatusList(), threshold);
+    int maxLevel = Status.INFO;
+    for (Status s : filteredList) {
+      if (s.getLevel() > maxLevel)
+        maxLevel = s.getLevel();
+    }
+    return maxLevel;
+  }
+
+  public boolean isErrorFree(long threshold) {
+    return Status.ERROR > getHighestLevel(threshold);
+  }
+
+  public boolean containsMatch(long threshold, int level, String regex) {
+    List<Status> filteredList = filterStatusListByTimeThreshold(sm.getCopyOfStatusList(), threshold);
+    Pattern p = Pattern.compile(regex);
+
+    for (Status status : filteredList) {
+      if (level != status.getLevel()) {
+        continue;
+      }
+      String msg = status.getMessage();
+      Matcher matcher = p.matcher(msg);
+      if (matcher.lookingAt()) {
+        return true;
+      }
+    }
+    return false;
+
+  }
+
+  public boolean containsMatch(int level, String regex) {
+    return containsMatch(0, level, regex);
+  }
+
+  public boolean containsMatch(String regex) {
+    Pattern p = Pattern.compile(regex);
+    for (Status status : sm.getCopyOfStatusList()) {
+      String msg = status.getMessage();
+      Matcher matcher = p.matcher(msg);
+      if (matcher.lookingAt()) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  public int matchCount(String regex) {
+    int count = 0;
+    Pattern p = Pattern.compile(regex);
+    for (Status status : sm.getCopyOfStatusList()) {
+      String msg = status.getMessage();
+      Matcher matcher = p.matcher(msg);
+      if (matcher.lookingAt()) {
+        count++;
+      }
+    }
+    return count;
+  }
+
+  public boolean containsException(Class exceptionType) {
+    Iterator stati = sm.getCopyOfStatusList().iterator();
+    while (stati.hasNext()) {
+      Status status = (Status) stati.next();
+      Throwable t = status.getThrowable();
+      if (t != null && t.getClass().getName().equals(exceptionType.getName())) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/util/CachingDateFormatter.java b/logback-core/src/main/java/ch/qos/logback/core/util/CachingDateFormatter.java
index 9be9dff..6f00ed4 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/util/CachingDateFormatter.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/util/CachingDateFormatter.java
@@ -1,58 +1,58 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.core.util;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-
-/**
- * A synchronized implementation of  SimpleDateFormat which uses caching internally.
- *
- * @author Ceki Gücü
- * @since 0.9.29
- */
-public class CachingDateFormatter {
-
-
-  long lastTimestamp = -1;
-  String cachedStr = null;
-  final SimpleDateFormat sdf;
-
-  public CachingDateFormatter(String pattern) {
-    sdf = new SimpleDateFormat(pattern);
-  }
-
-  public final String format(long now) {
-
-    // SimpleDateFormat is not thread safe.
-
-    // See also the discussion in http://jira.qos.ch/browse/LBCLASSIC-36
-    // DateFormattingThreadedThroughputCalculator and SelectiveDateFormattingRunnable
-    // are also note worthy
-
-    // The now == lastTimestamp guard minimizes synchronization
-    synchronized (this) {
-      if (now != lastTimestamp) {
-        lastTimestamp = now;
-        cachedStr = sdf.format(new Date(now));
-      }
-      return cachedStr;
-    }
-  }
-
-  public void setTimeZone(TimeZone tz) {
-    sdf.setTimeZone(tz);
-  }
-}
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.core.util;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
+
+/**
+ * A synchronized implementation of  SimpleDateFormat which uses caching internally.
+ *
+ * @author Ceki Gücü
+ * @since 0.9.29
+ */
+public class CachingDateFormatter {
+
+
+  long lastTimestamp = -1;
+  String cachedStr = null;
+  final SimpleDateFormat sdf;
+
+  public CachingDateFormatter(String pattern) {
+    sdf = new SimpleDateFormat(pattern);
+  }
+
+  public final String format(long now) {
+
+    // SimpleDateFormat is not thread safe.
+
+    // See also the discussion in http://jira.qos.ch/browse/LBCLASSIC-36
+    // DateFormattingThreadedThroughputCalculator and SelectiveDateFormattingRunnable
+    // are also note worthy
+
+    // The now == lastTimestamp guard minimizes synchronization
+    synchronized (this) {
+      if (now != lastTimestamp) {
+        lastTimestamp = now;
+        cachedStr = sdf.format(new Date(now));
+      }
+      return cachedStr;
+    }
+  }
+
+  public void setTimeZone(TimeZone tz) {
+    sdf.setTimeZone(tz);
+  }
+}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java b/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
index 5cd7812..ec708aa 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
@@ -1,42 +1,42 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.core.util;
-
-/**
- * @author Ceki Gücü
- */
-public class EnvUtil {
-
-
-  static public boolean isGroovyAvailable() {
-    ClassLoader classLoader = EnvUtil.class.getClassLoader();
-    try {
-      Class bindingClass = classLoader.loadClass("groovy.lang.Binding");
-      return (bindingClass != null);
-    } catch (ClassNotFoundException e) {
-      return false;
-    }
-  }
-
-
-  static public boolean isJaninoAvailable() {
-    ClassLoader classLoader = EnvUtil.class.getClassLoader();
-    try {
-      Class bindingClass = classLoader.loadClass("org.codehaus.janino.Cookable");
-      return (bindingClass != null);
-    } catch (ClassNotFoundException e) {
-      return false;
-    }
-  }
-}
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.core.util;
+
+/**
+ * @author Ceki Gücü
+ */
+public class EnvUtil {
+
+
+  static public boolean isGroovyAvailable() {
+    ClassLoader classLoader = EnvUtil.class.getClassLoader();
+    try {
+      Class bindingClass = classLoader.loadClass("groovy.lang.Binding");
+      return (bindingClass != null);
+    } catch (ClassNotFoundException e) {
+      return false;
+    }
+  }
+
+
+  static public boolean isJaninoAvailable() {
+    ClassLoader classLoader = EnvUtil.class.getClassLoader();
+    try {
+      Class bindingClass = classLoader.loadClass("org.codehaus.janino.Cookable");
+      return (bindingClass != null);
+    } catch (ClassNotFoundException e) {
+      return false;
+    }
+  }
+}

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

Summary of changes:
 .../core/pattern/parser/SimpleKeywordNode.java     |  128 ++++++------
 .../core/property/FileExistsPropertyDefiner.java   |   62 +++---
 .../ch/qos/logback/core/status/StatusChecker.java  |  238 ++++++++++----------
 .../logback/core/util/CachingDateFormatter.java    |  116 +++++-----
 .../java/ch/qos/logback/core/util/EnvUtil.java     |   84 ++++----
 5 files changed, 314 insertions(+), 314 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list