| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.loggers; |
| | | |
| | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.messages.LoggerMessages.*; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.io.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | |
| | | { |
| | | if(!FilePermission.setPermissions(file, filePermissions)) |
| | | { |
| | | Message message = WARN_LOGGER_UNABLE_SET_PERMISSIONS.get( |
| | | LocalizableMessage 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. |
| | | Message message = WARN_LOGGER_SET_PERMISSION_FAILED.get( |
| | | LocalizableMessage message = WARN_LOGGER_SET_PERMISSION_FAILED.get( |
| | | file.toString(), stackTraceToSingleLineString(e)); |
| | | ErrorLogger.logError(message); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | SizeLimitLogRotationPolicyCfg config, List<Message> unacceptableReasons) |
| | | SizeLimitLogRotationPolicyCfg config, List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This should always be ok |
| | | return true; |
| | |
| | | sizeLimit = newSizeLimit; |
| | | |
| | | return new ConfigChangeResult(ResultCode.SUCCESS, false, |
| | | new ArrayList<Message>()); |
| | | new ArrayList<LocalizableMessage>()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param reason The human-readable reason for the shutdown. |
| | | */ |
| | | public void processServerShutdown(Message reason) |
| | | public void processServerShutdown(LocalizableMessage reason) |
| | | { |
| | | stopRequested = true; |
| | | |