
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 560596f736cc1bf37171bd4d5d19dfc96a625550 (commit) via 3137fd970b900bbc2ae7554a57ab7df637fcb2e5 (commit) via e102325d3d3f696220f89fb37950a01ae7c3c948 (commit) from 4a2525be2fc34ffb6fcf3b0de8d0e01d821440fd (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=560596f736cc1bf37171bd4d5... http://github.com/ceki/logback/commit/560596f736cc1bf37171bd4d5d19dfc96a6255... commit 560596f736cc1bf37171bd4d5d19dfc96a625550 Merge: 4a2525b 3137fd9 Author: Ceki Gulcu <ceki@qos.ch> Date: Tue Apr 24 05:49:58 2012 -0700 Merge pull request #45 from CodingFabian/propertyaction-handle-filenotfound-gracefully Propertyaction handle filenotfound gracefully http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=3137fd970b900bbc2ae7554a5... http://github.com/ceki/logback/commit/3137fd970b900bbc2ae7554a57ab7df637fcb2... commit 3137fd970b900bbc2ae7554a57ab7df637fcb2e5 Author: Fabian Lange <lange.fabian@gmail.com> Date: Tue Apr 24 12:00:56 2012 +0200 PropertyAction will no longer print a full stack trace when the referenced file is not found. Sometimes those files referenced are optional, and a full stack trace does not contain additional information in that case. Resources already follow that principle to print a "Not Found" message without stacktrace when it cannot be found and only the stacktrace when there is a problem reading a found resource. diff --git a/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java b/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java index 2d93a4f..ba85164 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java +++ b/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java @@ -22,6 +22,7 @@ import ch.qos.logback.core.util.Loader; import ch.qos.logback.core.util.OptionHelper; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.net.URL; @@ -101,8 +102,10 @@ public class PropertyAction extends Action { try { FileInputStream istream = new FileInputStream(file); loadAndSetProperties(ec, istream, scope); - } catch (IOException e) { - addError("Could not read properties file [" + file + "].", e); + } catch (FileNotFoundException e) { + addError("Could not find properties file [" + file + "]."); + } catch (IOException e1) { + addError("Could not read properties file [" + file + "].", e1); } } else if (checkResourceAttributeSanity(attributes)) { String resource = attributes.getValue(RESOURCE_ATTRIBUTE); diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/action/PropertyActionTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/action/PropertyActionTest.java index d4b5133..8d2f20f 100644 --- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/PropertyActionTest.java +++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/PropertyActionTest.java @@ -156,6 +156,6 @@ public class PropertyActionTest { private boolean checkFileErrors() { Iterator it = context.getStatusManager().getCopyOfStatusList().iterator(); ErrorStatus es1 = (ErrorStatus)it.next(); - return "Could not read properties file [toto].".equals(es1.getMessage()); + return "Could not find properties file [toto].".equals(es1.getMessage()); } } http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=e102325d3d3f696220f89fb37... http://github.com/ceki/logback/commit/e102325d3d3f696220f89fb37950a01ae7c3c9... commit e102325d3d3f696220f89fb37950a01ae7c3c948 Author: Fabian Lange <lange.fabian@gmail.com> Date: Tue Apr 24 11:56:44 2012 +0200 fixed LBCORE-84 - typo in PropertyAction.java diff --git a/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java b/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java index 4d2f076..2d93a4f 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java +++ b/logback-core/src/main/java/ch/qos/logback/core/joran/action/PropertyAction.java @@ -86,7 +86,7 @@ public class PropertyAction extends Action { Attributes attributes) { if ("substitutionProperty".equals(localName)) { - addWarn("[substitutionProperty] element has been deprecated. Plase use the [property] element instead."); + addWarn("[substitutionProperty] element has been deprecated. Please use the [property] element instead."); } String name = attributes.getValue(NAME_ATTRIBUTE); ----------------------------------------------------------------------- Summary of changes: .../logback/core/joran/action/PropertyAction.java | 9 ++++++--- .../core/joran/action/PropertyActionTest.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- Logback: the generic, reliable, fast and flexible logging framework.