mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
25.21.2007 faa6d3a88db87dfae9de9d33c66362ac20bb525b
Added messages to better indicate when a log file can not be opened due to possible file permission problems. A case where this can happen if the user configures a logger to set permission on the log file that will make it unwritable to OpenDS (ie, UNIX mode 555). This allows the user better realize the problem and take corrective action.

Fix for issue 2107
5 files modified
22 ■■■■■ changed files
opends/src/messages/messages/config.properties 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/loggers/TextAccessLogPublisher.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/loggers/TextAuditLogPublisher.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/loggers/TextErrorLogPublisher.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java 6 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/config.properties
@@ -1972,7 +1972,7 @@
 while attempting to create a Directory Server log retention policy from the \
 information in configuration entry %s:  %s
SEVERE_ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER_661=An error occurred while \
 attempting create a text writer for a Directory Server logger from the \
 attempting to create a text writer for a Directory Server logger from the \
 information in configuration entry %s:  %s
SEVERE_WARN_CONFIG_SCHEMA_MULTIPLE_ENTRIES_IN_FILE_662=Schema configuration \
 file %s in directory %s contains more than one entry.  Only the first entry \
@@ -2110,3 +2110,5 @@
 is already defined for this component
INFO_CONFIG_JE_PROPERTY_REQUIRES_RESTART_708=Setting Berkeley DB JE property \
 %s will not take effect until the component for which it is set is restarted
SEVERE_ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE_709=An error occurred while \
 attempting to open the configured log file %s for logger %s:  %s
opends/src/server/org/opends/server/loggers/TextAccessLogPublisher.java
@@ -178,8 +178,8 @@
    }
    catch(IOException e)
    {
      Message message = ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER.get(
          config.dn().toString(), String.valueOf(e));
      Message message = ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE.get(
          logFile.toString(), config.dn().toString(), String.valueOf(e));
      throw new InitializationException(message, e);
    }
opends/src/server/org/opends/server/loggers/TextAuditLogPublisher.java
@@ -161,8 +161,8 @@
    }
    catch(IOException e)
    {
      Message message = ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER.get(
          config.dn().toString(), String.valueOf(e));
      Message message = ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE.get(
          logFile.toString(), config.dn().toString(), String.valueOf(e));
      throw new InitializationException(message, e);
    }
opends/src/server/org/opends/server/loggers/TextErrorLogPublisher.java
@@ -167,8 +167,8 @@
    }
    catch(IOException e)
    {
      Message message = ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER.get(
          config.dn().toString(), String.valueOf(e));
      Message message = ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE.get(
          logFile.toString(), config.dn().toString(), String.valueOf(e));
      throw new InitializationException(message, e);
    }
opends/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java
@@ -51,6 +51,8 @@
    WARN_CONFIG_LOGGER_INVALID_RETENTION_POLICY;
import static org.opends.messages.ConfigMessages.
    ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER;
import static org.opends.messages.ConfigMessages.
   ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE;
import java.util.*;
@@ -202,8 +204,8 @@
    }
    catch(IOException e)
    {
      Message message = ERR_CONFIG_LOGGING_CANNOT_CREATE_WRITER.get(
          config.dn().toString(), String.valueOf(e));
      Message message = ERR_CONFIG_LOGGING_CANNOT_OPEN_FILE.get(
          logFile.toString(), config.dn().toString(), String.valueOf(e));
      throw new InitializationException(message, e);
    }