
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 7f35c6f1e7ddab9baac0e71de1c9e251844658d8 (commit) via c93e406306c1eba98848f136a031447ca70ddaf0 (commit) from df32ded547dac8d53dfe0f3d8364efad1bc54f82 (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=7f35c6f1e7ddab9baac0e71de... http://github.com/ceki/logback/commit/7f35c6f1e7ddab9baac0e71de1c9e251844658... commit 7f35c6f1e7ddab9baac0e71de1c9e251844658d8 Author: Joern Huxhorn <jhuxhorn@googlemail.com> Date: Mon Nov 7 16:20:19 2011 +0100 Using entrySet instead of keySet for performance. diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java b/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java index 468f43e..4174215 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java @@ -51,18 +51,15 @@ public class MDCConverter extends ClassicConverter { // if no key is specified, return all the // values present in the MDC, separated with a single space. StringBuilder buf = new StringBuilder(); - Set<String> keys = mdcPropertyMap.keySet(); - Iterator it = keys.iterator(); - String tmpKey; - String tmpValue; - while (it.hasNext()) { - tmpKey = (String)it.next(); - tmpValue = (String)mdcPropertyMap.get(tmpKey); - //format: {testeKey=testValue, testKey2=testValue2} - buf.append(tmpKey).append('=').append(tmpValue); - if (it.hasNext()) { + boolean first = true; + for(Map.Entry<String, String> entry : mdcPropertyMap.entrySet()) { + if(first) { + first = false; + } else { buf.append(", "); } + //format: {testKey=testValue, testKey2=testValue2} + buf.append(entry.getKey()).append('=').append(entry.getValue()); } return buf.toString(); } http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=c93e406306c1eba98848f136a... http://github.com/ceki/logback/commit/c93e406306c1eba98848f136a031447ca70dda... commit c93e406306c1eba98848f136a031447ca70ddaf0 Author: Joern Huxhorn <jhuxhorn@googlemail.com> Date: Mon Nov 7 16:08:33 2011 +0100 Removing duplicate code in switch. diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/util/LevelToSyslogSeverity.java b/logback-classic/src/main/java/ch/qos/logback/classic/util/LevelToSyslogSeverity.java index e627335..05df1ef 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/util/LevelToSyslogSeverity.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/util/LevelToSyslogSeverity.java @@ -36,7 +36,6 @@ public class LevelToSyslogSeverity { case Level.INFO_INT: return SyslogConstants.INFO_SEVERITY; case Level.DEBUG_INT: - return SyslogConstants.DEBUG_SEVERITY; case Level.TRACE_INT: return SyslogConstants.DEBUG_SEVERITY; default: diff --git a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/OptionTokenizer.java b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/OptionTokenizer.java index 25e89d5..6af4f62 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/OptionTokenizer.java +++ b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/OptionTokenizer.java @@ -69,7 +69,6 @@ public class OptionTokenizer { case '\t': case '\r': case '\n': - break; case COMMA_CHAR: break; case SINGLE_QUOTE_CHAR: @@ -145,4 +144,4 @@ public class OptionTokenizer { escapeUtil.escape(escapeChars, buf, next, tokenStream.pointer); } } -} \ No newline at end of file +} diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/SequenceToRegex4SDF.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/SequenceToRegex4SDF.java index a63b22e..4842d1e 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/SequenceToRegex4SDF.java +++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/SequenceToRegex4SDF.java @@ -36,6 +36,7 @@ class SequenceToRegex4SDF { String toRegex() { switch (c) { case 'G': + case 'z': return ".*"; case 'M': if (occurrences >= 3) { @@ -61,8 +62,6 @@ class SequenceToRegex4SDF { return ".{2,12}"; case 'a': return ".{2}"; - case 'z': - return ".*"; case 'Z': return "(\\+|-)\\d{4}"; case '.': ----------------------------------------------------------------------- Summary of changes: .../qos/logback/classic/pattern/MDCConverter.java | 17 +++++++---------- .../classic/util/LevelToSyslogSeverity.java | 1 - .../core/pattern/parser/OptionTokenizer.java | 3 +-- .../core/rolling/helper/SequenceToRegex4SDF.java | 3 +-- 4 files changed, 9 insertions(+), 15 deletions(-) hooks/post-receive -- Logback: the generic, reliable, fast and flexible logging framework.