opendj3-server-dev/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java
@@ -25,18 +25,18 @@ * Portions Copyright 2014 ForgeRock AS */ package org.opends.server.loggers; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.List; import org.forgerock.i18n.LocalizableMessage; import java.util.*; import org.opends.server.util.TimeThread; import static org.opends.server.loggers.debug.DebugLogger.*; import org.opends.server.loggers.debug.DebugTracer; import org.opends.server.admin.std.server.FixedTimeLogRotationPolicyCfg; import org.forgerock.i18n.slf4j.LocalizedLogger; import org.opends.server.admin.server.ConfigurationChangeListener; import org.opends.server.admin.std.server.FixedTimeLogRotationPolicyCfg; import org.opends.server.types.ConfigChangeResult; import org.opends.server.types.ResultCode; import org.opends.server.util.TimeThread; /** @@ -47,13 +47,7 @@ RotationPolicy<FixedTimeLogRotationPolicyCfg>, ConfigurationChangeListener<FixedTimeLogRotationPolicyCfg> { /** * The tracer object for the debug logger. */ private static final DebugTracer TRACER = getTracer(); private static final long MS_IN_DAY = 24 * 3600 * 1000; private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); // The scheduled rotation times as ms offsets from the beginnging of the day. private int[] rotationTimes; @@ -138,10 +132,7 @@ nextRotationTime.set(Calendar.MINUTE, rotationTimes[i] % 100); } if (debugEnabled()) { TRACER.debugInfo("The next fixed rotation time is %s", rotationTimes[i]); } logger.trace("The next fixed rotation time is %s", rotationTimes[i]); return TimeThread.getCalendar().after(nextRotationTime); } opendj3-server-dev/src/server/org/opends/server/loggers/ZIPAction.java
@@ -22,6 +22,7 @@ * * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2014 ForgeRock AS. */ package org.opends.server.loggers; @@ -32,9 +33,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import static org.opends.server.loggers.debug.DebugLogger.*; import org.opends.server.loggers.debug.DebugTracer; import org.opends.server.types.DebugLogLevel; import org.forgerock.i18n.slf4j.LocalizedLogger; /** * This class implements a post rotation action that compresses @@ -42,11 +41,8 @@ */ public class ZIPAction implements PostRotationAction { /** * The tracer object for the debug logger. */ private static final DebugTracer TRACER = getTracer(); private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); private File originalFile; private File newFile; @@ -124,10 +120,7 @@ return true; } catch(IOException ioe) { if (debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ioe); } logger.traceException(ioe); if (inputStreamOpen) { try @@ -136,10 +129,7 @@ } catch (Exception fe) { if (debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, fe); } logger.traceException(fe); // Cannot do much. Ignore. } } @@ -151,10 +141,7 @@ } catch (Exception ze) { if (debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ze); } logger.traceException(ze); // Cannot do much. Ignore. } } opendj3-server-dev/src/snmp/src/org/opends/server/snmp/DIRECTORY_SERVER_MIBImpl.java
@@ -22,14 +22,14 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock Inc. * Portions Copyright 2012-2014 ForgeRock Inc. */ package org.opends.server.snmp; import javax.management.MBeanServer; import javax.management.ObjectName; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; import org.forgerock.i18n.slf4j.LocalizedLogger; /** * The class is the "DIRECTORY-SERVER-MIB" implementation. @@ -43,10 +43,9 @@ * utility included with the Java SDK. */ private static final long serialVersionUID = 1420660265781848102L; /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); /** * Indicates if the SNMP Mbeans have to be registered or not. */ @@ -75,10 +74,8 @@ super(); this.registeredSnmpMBean = registeredMBean; this.mibObName = mibName; if (DebugLogger.debugEnabled()) { TRACER.debugVerbose("DIRECTORY_SERVER_MIB=" + this.mibObName + " created with registerMBean=" + this.registeredSnmpMBean); } logger.trace("DIRECTORY_SERVER_MIB=%s created with registerMBean=%s", this.mibObName, this.registeredSnmpMBean); } /** opendj3-server-dev/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
@@ -22,17 +22,17 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock AS * Portions Copyright 2012-2014 ForgeRock AS * */ package org.opends.server.snmp; import com.sun.management.snmp.agent.SnmpMib; import javax.management.MBeanServer; import javax.management.ObjectName; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; import org.opends.server.types.DebugLogLevel; import org.forgerock.i18n.slf4j.LocalizedLogger; /** * The class is used for representing "DsApplIfOpsEntryImpl" implementation. @@ -46,10 +46,9 @@ * utility included with the Java SDK. */ private static final long serialVersionUID = 3876259684025799091L; /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); /** * ObjectName of the DsApplIfOpsEntry. */ @@ -346,9 +345,7 @@ SNMPConnectionHandlerDefinitions.SNMP_DOMAIN + "type=DsApplIfOpsEntry,name=" + name); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); return null; } } opendj3-server-dev/src/snmp/src/org/opends/server/snmp/DsMIBImpl.java
@@ -22,25 +22,26 @@ * * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2012 ForgeRock Inc. * Portions Copyright 2012-2014 ForgeRock Inc. */ package org.opends.server.snmp; import javax.management.MBeanServer; import com.sun.management.snmp.agent.SnmpMib; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.Set; import javax.management.MBeanServerNotification; import javax.management.Notification; import javax.management.NotificationListener; import javax.management.ObjectName; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; import org.opends.server.types.DebugLogLevel; import org.forgerock.i18n.slf4j.LocalizedLogger; /** * The class represents the "DsMIB" group implementation. @@ -56,10 +57,7 @@ */ private static final long serialVersionUID = 6787374593664749374L; /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); /** * Directory Server MIB access. @@ -132,9 +130,7 @@ // Initialize the MIB initDsTables(); if (DebugLogger.debugEnabled()) { TRACER.debugVerbose("DsMIB Group Created"); } logger.trace("DsMIB Group Created"); } /** @@ -211,9 +207,7 @@ "JMImplementation:type=MBeanServerDelegate"); this.server.addNotificationListener(name, this, null, null); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); } } @@ -260,15 +254,13 @@ // Add the entry in the table this.DsTable.addEntry(entry, entry.getObjectName()); this.dsTableEntries.put(entry.getObjectName(), (DsEntry)entry); this.dsTableEntries.put(entry.getObjectName(), entry); if (this.registeredSnmpMBean) { // Register the SNMP OID MBean this.server.registerMBean(entry, entry.getObjectName()); } } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); return false; } return true; @@ -309,10 +301,8 @@ this.server.registerMBean(entry, entry.getObjectName()); } } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } return false; logger.traceException(ex); return false; } return true; } @@ -331,7 +321,7 @@ DsApplIfOpsEntryImpl entry = (DsApplIfOpsEntryImpl) this.dsApplIfOpsTableEntries.get(connectionHandlerName); this.DsApplIfOpsTable.removeEntry((DsApplIfOpsEntryMBean) entry); this.DsApplIfOpsTable.removeEntry(entry); this.dsApplIfOpsTableEntries.remove(connectionHandlerName); this.server.unregisterMBean(entry.getObjectName()); return true; opendj3-server-dev/src/snmp/src/org/opends/server/snmp/DsTableEntryImpl.java
@@ -22,18 +22,20 @@ * * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2014 ForgeRock AS */ package org.opends.server.snmp; import com.sun.management.snmp.agent.SnmpMib; import java.util.Iterator; import java.util.Set; import javax.management.MBeanServer; import javax.management.ObjectName; import org.forgerock.i18n.slf4j.LocalizedLogger; import org.opends.guitools.controlpanel.util.Utilities; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; import org.opends.server.types.DebugLogLevel; /** * The class is used for implementing the "DsTableEntry" group implementation. @@ -48,10 +50,9 @@ * utility included with the Java SDK. */ private static final long serialVersionUID = -3346380035687141480L; /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); /** * Directory Server MBeanServer. */ @@ -98,9 +99,7 @@ "buildID"); return SNMPMonitor.string2ByteArray(value1 + " - " + value2); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); return null; } } @@ -117,9 +116,7 @@ "entryCacheHits")); return SNMPMonitor.counter32Value(value); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); } return 0L; } @@ -136,9 +133,7 @@ "currentEntryCacheCount")); return SNMPMonitor.gauge32Value(value); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); } return 0L; } @@ -163,9 +158,7 @@ } return SNMPMonitor.gauge32Value(result); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); } return 0L; } @@ -191,9 +184,7 @@ "type=DsTableEntry,name=" + SNMPConnectionHandlerDefinitions.MONITOR_SYSTEM_INFORMATION_OBJECTNAME); } catch (Exception ex) { if (DebugLogger.debugEnabled()) { TRACER.debugCaught(DebugLogLevel.ERROR, ex); } logger.traceException(ex); } } return this.entryName; opendj3-server-dev/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java
@@ -22,7 +22,7 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions copyright 2013 ForgeRock AS * Portions copyright 2013-2014 ForgeRock AS */ package org.opends.server.snmp; @@ -36,8 +36,6 @@ import java.util.Vector; import org.opends.server.admin.std.server.SNMPConnectionHandlerCfg; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; /** * This class allows to manage the IP-ACL based access rights @@ -46,10 +44,6 @@ public class SNMPInetAddressAcl implements InetAddressAcl { /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); /** * Current Security Configuration for the SNMP Connection Handler. */ private SNMPConnectionHandlerCfg currentConfig; opendj3-server-dev/src/snmp/src/org/opends/server/snmp/SNMPUserAcl.java
@@ -22,6 +22,7 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2014 ForgeRock AS */ package org.opends.server.snmp; @@ -29,8 +30,6 @@ import java.util.SortedSet; import org.opends.server.admin.std.meta.SNMPConnectionHandlerCfgDefn.*; import org.opends.server.admin.std.server.SNMPConnectionHandlerCfg; import org.opends.server.loggers.debug.DebugLogger; import org.opends.server.loggers.debug.DebugTracer; /** * The SNMP User ACL. @@ -39,10 +38,6 @@ public class SNMPUserAcl implements UserAcl { /** * The debug log tracer for this class. */ private static final DebugTracer TRACER = DebugLogger.getTracer(); /** * If * then all the users are allowed to access in read. */ private static final String ALL_USERS_ALLOWED = "*";