summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-06-27 18:44:16 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-06-27 19:38:50 +0200
commit833708b48ea76e71ddf1fa9b0cba53a5aa23a459 (patch)
tree6af2cec5e7017941fbb7d40b89511f778bb2cba4
parentc297d987d29755452b192ae1306610733381771a (diff)
Fixed error message on invalid log type.
To help troubleshooting the error message on invalid log type has been modified to include the invalid value. https://pagure.io/dogtagpki/issue/2689 Change-Id: Ie245bd9e3a3925979af4708fa911697a9746e54b
-rw-r--r--base/server/cms/src/com/netscape/cms/logging/LogFile.java3
-rw-r--r--base/server/cmsbundle/src/UserMessages.properties2
-rw-r--r--base/server/cmscore/src/com/netscape/cmscore/logging/LogSubsystem.java9
3 files changed, 6 insertions, 8 deletions
diff --git a/base/server/cms/src/com/netscape/cms/logging/LogFile.java b/base/server/cms/src/com/netscape/cms/logging/LogFile.java
index 1b4aeee0d..8a65160f0 100644
--- a/base/server/cms/src/com/netscape/cms/logging/LogFile.java
+++ b/base/server/cms/src/com/netscape/cms/logging/LogFile.java
@@ -511,9 +511,8 @@ public class LogFile implements ILogEventListener, IExtendedPluginInfo {
} else if (mType.equals(ILogger.PROP_AUDIT)) {
defaultFileName = "logs/transactions";
} else {
- //wont get here
throw new ELogException(CMS.getUserMessage("CMS_LOG_INVALID_LOG_TYPE",
- config.getName()));
+ config.getName(), mType));
}
try {
diff --git a/base/server/cmsbundle/src/UserMessages.properties b/base/server/cmsbundle/src/UserMessages.properties
index ed2a6205d..8ff07d894 100644
--- a/base/server/cmsbundle/src/UserMessages.properties
+++ b/base/server/cmsbundle/src/UserMessages.properties
@@ -505,7 +505,7 @@ CMS_LOG_INVALID_FILE_NAME=Attempt to initialize log with an invalid filename: \"
CMS_LOG_UNEXPECTED_EXCEPTION=Caught unexpected exception: {0}
CMS_LOG_ILLEGALARGUMENT=Illegal argument when opening: {0}
CMS_LOG_CLOSE_FAILED=Failed to close file \"{0}\", error: {1}
-CMS_LOG_INVALID_LOG_TYPE=Attempt to initialize log with an invalid log type: \"{0}\"
+CMS_LOG_INVALID_LOG_TYPE=Invalid log type in \"{0}\" property: {1}
CMS_LOG_SRVLT_ILL_PLUGIN_ID=Another plugin ID already exists {0}
CMS_LOG_SRVLT_NULL_CLASS=Plugin classname is null
CMS_LOG_SRVLT_NO_CLASS=Plugin class not found
diff --git a/base/server/cmscore/src/com/netscape/cmscore/logging/LogSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/logging/LogSubsystem.java
index ba405c2cd..e09e1c2ea 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/logging/LogSubsystem.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/logging/LogSubsystem.java
@@ -127,18 +127,17 @@ public class LogSubsystem implements ILogSubsystem {
// for view from console
} catch (ClassNotFoundException e) {
- throw new EBaseException(insName + ":Failed to instantiate class " + className);
+ throw new EBaseException(insName + ": Failed to instantiate class " + className + ": " + e.getMessage(), e);
} catch (IllegalAccessException e) {
- throw new EBaseException(insName + ":Failed to instantiate class " + className);
+ throw new EBaseException(insName + ": Failed to instantiate class " + className + ": " + e.getMessage(), e);
} catch (InstantiationException e) {
- throw new EBaseException(insName + ":Failed to instantiate class " + className);
+ throw new EBaseException(insName + ": Failed to instantiate class " + className + ": " + e.getMessage(), e);
} catch (Throwable e) {
- e.printStackTrace();
throw new EBaseException(insName
- + ":Failed to instantiate class " + className + " error: " + e.getMessage());
+ + ": Failed to instantiate class " + className + " error: " + e.getMessage(), e);
}
if (insName == null) {