From 80c58327faaa4873369f6bb949e62792c2f708e0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opends/src/server/org/opends/server/loggers/MultifileTextWriter.java | 30 ++++++++++++------------------
1 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java b/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java
index eef2ae4..a4b3d52 100644
--- a/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java
+++ b/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java
@@ -26,6 +26,7 @@
*/
package org.opends.server.loggers;
+
import org.opends.server.api.DirectoryThread;
import org.opends.server.api.ServerShutdownListener;
import org.opends.server.core.DirectoryServer;
@@ -38,9 +39,8 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
-import static org.opends.server.messages.LoggerMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.loggers.ErrorLogger.*;
+import static org.opends.messages.LoggerMessages.*;
+import org.opends.messages.Message;
import java.io.*;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -198,23 +198,17 @@
{
if(!FilePermission.setPermissions(file, filePermissions))
{
- int msgID = MSGID_LOGGER_UNABLE_SET_PERMISSIONS;
- String message = getMessage(msgID, filePermissions.toString(),
- file.toString());
- logError(ErrorLogCategory.CONFIGURATION,
- ErrorLogSeverity.MILD_WARNING,
- message, msgID);
+ Message message = WARN_LOGGER_UNABLE_SET_PERMISSIONS.get(
+ filePermissions.toString(), file.toString());
+ ErrorLogger.logError(message);
}
}
catch(Exception e)
{
// Log an warning that the permissions were not set.
- int msgID = MSGID_LOGGER_SET_PERMISSION_FAILED;
- String message = getMessage(msgID, file.toString(),
- stackTraceToSingleLineString(e));
- logError(ErrorLogCategory.CONFIGURATION,
- ErrorLogSeverity.SEVERE_WARNING,
- message, msgID);
+ Message message = WARN_LOGGER_SET_PERMISSION_FAILED.get(
+ file.toString(), stackTraceToSingleLineString(e));
+ ErrorLogger.logError(message);
}
}
}
@@ -355,7 +349,7 @@
* {@inheritDoc}
*/
public boolean isConfigurationChangeAcceptable(
- SizeLimitLogRotationPolicyCfg config, List<String> unacceptableReasons)
+ SizeLimitLogRotationPolicyCfg config, List<Message> unacceptableReasons)
{
// This should always be ok
return true;
@@ -373,7 +367,7 @@
}
return new ConfigChangeResult(ResultCode.SUCCESS, false,
- new ArrayList<String>());
+ new ArrayList<Message>());
}
/**
@@ -461,7 +455,7 @@
*
* @param reason The human-readable reason for the shutdown.
*/
- public void processServerShutdown(String reason)
+ public void processServerShutdown(Message reason)
{
stopRequested = true;
--
Gitblit v1.10.0