You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/09/01 15:48:16 UTC
[james-project] 01/02: JAMES-3668 Enhance logging experience for extra properties
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 2df0d5e9dede3f0faec19ababc4825229cebe490
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Tue Aug 30 17:14:38 2022 +0700
JAMES-3668 Enhance logging experience for extra properties
- Adding an info log when loading extra properties file is a success
- Removing the if statement in the FileNotFoundException case (I had the case with docker and the default relative path missing and without logs it was not trivial to debug)
---
.../guice/common/src/main/java/org/apache/james/ExtraProperties.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/server/container/guice/common/src/main/java/org/apache/james/ExtraProperties.java b/server/container/guice/common/src/main/java/org/apache/james/ExtraProperties.java
index 3a022fb747..598d3915b6 100644
--- a/server/container/guice/common/src/main/java/org/apache/james/ExtraProperties.java
+++ b/server/container/guice/common/src/main/java/org/apache/james/ExtraProperties.java
@@ -32,10 +32,9 @@ public class ExtraProperties {
String propsPath = System.getProperty(OVERRIDE_PROPERTY, DEFAULT_PATH);
try (FileInputStream in = new FileInputStream(propsPath)) {
System.getProperties().load(in);
+ JamesServerMain.LOGGER.info("Load extra system properties file {}", propsPath);
} catch (FileNotFoundException e) {
- if (!DEFAULT_PATH.equals(propsPath)) {
- JamesServerMain.LOGGER.warn("Could not find extra system properties file {}", propsPath);
- }
+ JamesServerMain.LOGGER.warn("Could not find extra system properties file {}", propsPath);
} catch (IOException e) {
JamesServerMain.LOGGER.warn(
"Failed to load extra system properties from file {} : {}", propsPath, e.getMessage());
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org