| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.loggers; |
| | | |
| | |
| | | import org.opends.server.config.StringConfigAttribute; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.LoggerMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class RotationConfigUtil |
| | | { |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.loggers.RotationConfigUtil"; |
| | | |
| | | |
| | | /** |
| | |
| | | getRotationPolicies(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRotationPolicies", |
| | | String.valueOf(configEntry)); |
| | | |
| | | HashSet<String> allowedValues = new HashSet<String>(); |
| | | allowedValues.add("size"); |
| | |
| | | getRetentionPolicies(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRetentionPolicies", |
| | | String.valueOf(configEntry)); |
| | | |
| | | StringConfigAttribute logFileStub = |
| | | new StringConfigAttribute(ATTR_LOGGER_FILE, |
| | |
| | | getPostRotationActions(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPostRotationActions", |
| | | String.valueOf(configEntry)); |
| | | |
| | | ArrayList<ActionType> actions = new ArrayList<ActionType>(); |
| | | |
| | | StringConfigAttribute rotationActionStub = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "getCertificateAlias", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | |
| | | public static int getIntegerAttribute(ConfigEntry configEntry, |
| | | String attrName, int msgID) throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getIntegerAttribute", |
| | | String.valueOf(configEntry), attrName); |
| | | |
| | | int value = -1; |
| | | |
| | | IntegerConfigAttribute attrStub = |