Package com.nt.udc.log
Class Logger
java.lang.Object
com.nt.udc.log.Logger
- All Implemented Interfaces:
LoggerIfc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final int
Deprecated.static final int
Deprecated.static String
static String
static final int
Deprecated.static final int
Deprecated.static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface com.nt.udc.ndk.node.LoggerIfc
FC_CONFIGURATION, FC_CONNECTIVITY, FC_INITIALIZATION, FC_INTERNALERROR, FC_INVALIDDATA, FC_NODE_CONTROL, FC_RESOURCES, FC_SECURITY, FC_SERVER_CONTROL, FC_UNDEFINED, SF_CONF_CHANGE_ERROR, SF_CONF_CONFIG_FAIL, SF_CONF_ERR_NODE_CONF, SF_CONF_INV_FTP_CONF, SF_CONF_INV_NODE_CONF, SF_CONF_INV_PARAM, SF_CONF_INV_PARAM_VAL, SF_CONF_INV_REM_DIR, SF_CONF_MISSING_PARM, SF_CONF_MISSING_PARM2, SF_CONF_NM_CONF_ERROR, SF_CONF_NO_CONFIG, SF_CONF_NO_FTP_INT, SF_CONF_NODE_CREATION, SF_CONF_NODE_START, SF_CONF_NPL_CRITICAL, SF_CONF_NPL_ERROR, SF_CONF_READ_ERROR, SF_CONF_READ_PROPS, SF_CONF_SAVE_ERROR, SF_CONF_SOCKET_INIT, SF_CONF_VER_VALIDATION, SF_CONN_DB_CON_ERR, SF_CONN_DB_CON_LOST, SF_CONN_DEGRADED_ERR, SF_CONN_ECE_CON_ERR, SF_CONN_ERR_NODEINFO, SF_CONN_ERR_RCV_DATA, SF_CONN_ERR_SEND_ACK, SF_CONN_ERROR_TACHYON_USAGE, SF_CONN_FAILED_TO_RECEIVE_RESPONSE, SF_CONN_FILE_READ_ERR, SF_CONN_FTP_ERROR, SF_CONN_FTP_ERROR2, SF_CONN_FTP_LOGIN, SF_CONN_INTERFACING_CON_ERR, SF_CONN_INVALID_TACHYON_RECORD, SF_CONN_LDAP_CONNECT, SF_CONN_LOST_NM, SF_CONN_NM_API_ERR, SF_CONN_PDU_NULL, SF_CONN_POLL_ERR, SF_CONN_SNMP_SESS_OPEN_FAIL, SF_CONN_TIMED_OUT, SF_DATA_AGGR_ERROR, SF_DATA_ATTR_CREATE, SF_DATA_ATTR_PARSE, SF_DATA_ATTR_SHIFT, SF_DATA_CANNOT_ENCODE, SF_DATA_CANT_ACK, SF_DATA_CANT_ENCODE, SF_DATA_CONV_STR_TO_N, SF_DATA_CONV_TO_STR, SF_DATA_CONVERT_ATTR, SF_DATA_DATA_EXPIRED, SF_DATA_DATA_MISSING, SF_DATA_DATA_PROC_ERR, SF_DATA_ENCODE_ERR, SF_DATA_ERR_CREATE, SF_DATA_ERR_SEND_ACK, SF_DATA_ERROR_IN_NPL, SF_DATA_ERROR_ON_ACK, SF_DATA_FILE_DATA, SF_DATA_FILE_PROC_ERR, SF_DATA_FORMAT_ERROR, SF_DATA_IE_INVALID, SF_DATA_IE_MISSING, SF_DATA_INPUT_INVALID, SF_DATA_INV_ATT_TYPE, SF_DATA_INV_ATTR_NPL, SF_DATA_INV_RECORD, SF_DATA_INV_TRAF_VOL, SF_DATA_JDBC_DRIVER_ERR, SF_DATA_KEY_CREATE, SF_DATA_MISSING_ATTRS, SF_DATA_MSG_TOO_SMALL, SF_DATA_MSG_TYPE, SF_DATA_NAR_IS_NULL, SF_DATA_NO_DATA_FILE, SF_DATA_NO_OPT_IE, SF_DATA_REC_INCOMP, SF_DATA_RECORD_PROC, SF_DATA_RECORD_SAVE, SF_DATA_SRC_READ_ERR, SF_DATA_UNABLE_COMPLETE, SF_DATA_UNEXP_NAR, SF_DATA_UNEXPECTED, SF_DATA_VAL_NOT_FOUND, SF_DATA_WRONG_DECODER, SF_INIT_DB_CON_ERR, SF_INIT_DIR_CON_ERR, SF_INIT_IO_ERR, SF_INIT_LDM, SF_INIT_LDM_RUN, SF_INIT_NODE_CONFIG, SF_INIT_NODE_CREATION, SF_INIT_NODE_INIT, SF_INIT_NODE_START, SF_INIT_RDM, SF_INIT_RDM_RUN, SF_INIT_REG_ERROR, SF_INIT_RULE_LOAD_ERR, SF_INIT_SOCKET_CREATE, SF_INIT_SOCKET_INIT, SF_INT_ERR_ETRACE, SF_INT_ERR_EXCEPTION, SF_INT_ERR_EXPIRE_ERR, SF_INT_ERR_FIELD_NULL, SF_INT_ERR_PROC_ERR, SF_INT_ERR_SHUTDOWN, SF_NC_ERR_IN_NODE, SF_NC_ERR_MNG_SERVER, SF_NC_ERR_NODE_STATE, SF_NC_ERR_PROC_DATA, SF_NC_ERR_RESTARTING, SF_NC_ERR_STARTING, SF_NC_ERR_STOPPING, SF_NC_ERR_UNHEALTHY, SF_NC_NODE_CONF_ERROR, SF_NC_NODE_SHUTDOWN, SF_RES_CPU_MAJOR, SF_RES_CPU_MINOR, SF_RES_CPU_USAGE_ERR, SF_RES_DISK_CRITICAL, SF_RES_DISK_MINOR, SF_RES_DISK_STATUS, SF_RES_DISK_USAGE, SF_RES_ERR_DATA_READ, SF_RES_ERR_DATA_REM, SF_RES_ERR_DB_CLOSE, SF_RES_ERR_DB_OP, SF_RES_ERR_DEL_ENTRY, SF_RES_ERR_DIR_CLOSE, SF_RES_ERR_DIR_CREATE, SF_RES_ERR_DIR_DELETE, SF_RES_ERR_DIR_OPEN, SF_RES_ERR_DIR_PROC, SF_RES_ERR_DIR_READ, SF_RES_ERR_DIR_WRITE, SF_RES_ERR_ENT_CREATE, SF_RES_ERR_FILE_CLOSE, SF_RES_ERR_FILE_CREAT, SF_RES_ERR_FILE_DEL, SF_RES_ERR_FILE_MOVE, SF_RES_ERR_FILE_NAME, SF_RES_ERR_FILE_OPEN, SF_RES_ERR_FILE_PROC, SF_RES_ERR_FILE_READ, SF_RES_ERR_FILE_REN, SF_RES_ERR_FILE_WRITE, SF_RES_ERR_IN_TRANS, SF_RES_ERR_INST_CLASS, SF_RES_ERR_INST_REC, SF_RES_ERR_IO_ERR, SF_RES_ERR_OPEN_TRANS, SF_RES_ERR_READ_DU, SF_RES_ERR_SOCK_CLOSE, SF_RES_ERR_SOCK_CREAT, SF_RES_ERR_SOCK_OPEN, SF_RES_ERR_SOCK_WRITE, SF_RES_ERR_TABLE_ACC, SF_RES_ERR_TABLE_CLOS, SF_RES_ERR_TABLE_OPEN, SF_RES_ERR_TIMER_SCHED, SF_RES_ERR_USING_Q, SF_RES_IS_NULL, SF_RES_MEM_MAJOR, SF_RES_MEM_WARNING, SF_RES_NO_LICENSE, SF_RES_NODE_STATE_R, SF_RES_NODE_STATE_W, SF_SEC_NO_USER_AUTH, SF_SEC_USER_AUTH_FAIL, SF_SEC_USER_CFG_FAIL, SF_SRV_CNTRL, SF_UND_INTERRUPTED, SF_UND_SHUTDOWN_ERR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all fault conditions that currently exist within this instance of a Loggervoid
clearStatus
(StatusMessage smsg) void
clearStatus
(String category, String specificAlarm) Clear existing fault condition defined by Strings category and specificAlarm.static boolean
createDefaultLogger
(Hashtable<String, String> configTable, String id, File logdir, String serverNameOrNodeMajorType, String osaHomeDir, String trapHostFilePath) This method creates the default server loggerboolean
createLoggerPropertiesFile
(String loggerNodeName, String serverNameOrNodeMajorType, boolean nodeDebugLevel) void
createLoggerXml
(String loggerNodeName, String serverNameOrNodeMajorType, boolean nodeDebugLevel) static Logger
createNewLogger
(Hashtable<String, String> configTable, String nodeId, File logdir, String serverNameOrNodeMajorType, String osaHomeDir, String trapHostFilePath, boolean debugLevel) This method will create an instance of new loggerstatic Logger
This method returns the default logger, ie when called form node manager this returns node manager logger and when called from admin server, this returns admin server logorg.apache.logging.log4j.Logger
getSubLogger
(String name) boolean
boolean
static boolean
isRSM()
void
logCritical
(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of critical.void
void
void
void
This method has been deprecated as of Network Mediation Release 3.3.void
Log a message to the Logger with severity of info.void
Log a message to the Logger with severity of info.void
logMajor
(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of major.void
logMinor
(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of minor.void
logMsgAutoClear
(boolean clear, String clearMsg, String functDesc, int statusLvl, int dbgLvl, String errMsg) This method has been deprecated as of Network Mediation Release 3.3.void
logMsgManClear
(String functDesc, int statusLvl, int dbgLvl, String errMsg) This method has been deprecated as of Network Mediation Release 3.3.void
This method has been deprecated as of Network Mediation Release 3.3.void
logWarning
(String message, boolean autoClear, Exception exception) This method has been deprecated as of Network Mediation Release 3.3.void
logWarning
(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of warning.void
modifyLogLevel
(String loggerNodeName, String logLevel) void
modifyMaxLoggerSize
(String loggerNodeName, String serverNameOrNodeMajorType, boolean nodeDebugLevel) void
reconfigure
(Hashtable configTable) void
void
void
updateLog4jfile
(String text, int status) void
writeTofile
(Document doc)
-
Field Details
-
DBG_ERROR
Deprecated.- See Also:
-
DBG_WARNING
Deprecated.- See Also:
-
DBG_TRACE
Deprecated.- See Also:
-
DBG_NONE
Deprecated.- See Also:
-
OCOMC_OVERRIDE_LOGGER_FILE_PATH
- See Also:
-
IS_CNE_ENV
- See Also:
-
FALSE
- See Also:
-
DBG_OFF
-
DBG_ON
-
consolePatern
- See Also:
-
rollingFilePattern
- See Also:
-
SizeBasedTriggeringPolicy_str
- See Also:
-
Policies_str
- See Also:
-
PatternLayout_str
- See Also:
-
filePattern_str
- See Also:
-
fileName_str
- See Also:
-
RollingFile_str
- See Also:
-
name_str
- See Also:
-
pattern_str
- See Also:
-
DefaultRolloverStrategy_str
- See Also:
-
max_str
- See Also:
-
max_default
- See Also:
-
Logger_str
- See Also:
-
AsyncLogger_str
- See Also:
-
additivity_str
- See Also:
-
AppenderRef_str
- See Also:
-
ref_str
- See Also:
-
level_str
- See Also:
-
appenders_str
- See Also:
-
loggers_str
- See Also:
-
DEFAULT_MAX_SIZE
public static final int DEFAULT_MAX_SIZE- See Also:
-
-
Constructor Details
-
Logger
Deprecated.- See Also:
-
-
Method Details
-
getLogger
This method returns the default logger, ie when called form node manager this returns node manager logger and when called from admin server, this returns admin server log- Returns:
- com.nt.udc.log.Logger
- Throws:
Exception
-
createDefaultLogger
public static boolean createDefaultLogger(Hashtable<String, String> configTable, String id, File logdir, String serverNameOrNodeMajorType, String osaHomeDir, String trapHostFilePath) This method creates the default server logger- Parameters:
configTable
-id
-logdir
-serverNameOrNodeMajorType
-osaHomeDir
-trapHostFilePath
-- Returns:
-
isRSM
public static boolean isRSM() -
createNewLogger
public static Logger createNewLogger(Hashtable<String, String> configTable, String nodeId, File logdir, String serverNameOrNodeMajorType, String osaHomeDir, String trapHostFilePath, boolean debugLevel) This method will create an instance of new logger- Parameters:
configTable
-nodeId
-logdir
-serverNameOrNodeMajorType
-osaHomeDir
-trapHostFilePath
-debugLevel
-- Returns:
-
createLoggerXml
-
writeTofile
-
createLoggerPropertiesFile
-
modifyMaxLoggerSize
-
modifyLogLevel
-
reconfigure
-
getStatus
-
clearStatus
-
clearStatus
public void clearStatus()Clear all fault conditions that currently exist within this instance of a Logger- Specified by:
clearStatus
in interfaceLoggerIfc
-
clearStatus
Clear existing fault condition defined by Strings category and specificAlarm.- Specified by:
clearStatus
in interfaceLoggerIfc
-
logMsgAutoClear
public void logMsgAutoClear(boolean clear, String clearMsg, String functDesc, int statusLvl, int dbgLvl, String errMsg) This method has been deprecated as of Network Mediation Release 3.3. Do not use. This method will clear a previously logged message having a non-good status for the designated function descriptor if the clear flag is set to true. In this case, it does not matter what the statusLvl value is since the status will be GOOD. If the clear flag is false, then the message is logged normally with the status and error message passed in.- See Also:
-
logMsgManClear
This method has been deprecated as of Network Mediation Release 3.3. Do not use. This method simply logs the status message with the designated status. Since these messages will not be cleared in the code, they will need to be cleared from the Admin GUI.- See Also:
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabled
in interfaceLoggerIfc
-
isInfoEnabled
public boolean isInfoEnabled()- Specified by:
isInfoEnabled
in interfaceLoggerIfc
-
updateLog4jfile
-
setSNMPTrapGenerator
-
getSNMPTrapGenerator
-
logError
This method has been deprecated as of Network Mediation Release 3.3. Do not use.- Specified by:
logError
in interfaceLoggerIfc
- Parameters:
message
- Desired text for the error message to be written into the log file.autoClear
- Indicates whether this condition can be automatically cleared by the system. Iffalse
, the alarm must be manually cleared by the user.exception
- The exception which causes this alarm.- See Also:
-
logWarning
This method has been deprecated as of Network Mediation Release 3.3. Do not use.- Specified by:
logWarning
in interfaceLoggerIfc
- Parameters:
message
- Desired text for the error message to be written into the log file.autoClear
- Indicates whether this condition can be automatically cleared by the system. Iffalse
, the alarm must be manually cleared by the user.exception
- The exception which causes this alarm- See Also:
-
logInfo
Log a message to the Logger with severity of info. Messages of severity info do not result in generation of an SNMP notification. -
logInfo
Log a message to the Logger with severity of info. Messages of severity info do not result in generation of an SNMP notification. -
logTrace
This method has been deprecated as of Network Mediation Release 3.3. Do not use. -
logDebug
-
logDebug
-
logDebug
-
logCritical
public void logCritical(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of critical. An SNMP notification will also be sent if one or more SNMP Trap Host (trap destinations) are defined. Based on node's Debug Level (on/off) the stack trace of passed exception is also logged.- Specified by:
logCritical
in interfaceLoggerIfc
- Parameters:
faultCategory
- A general category of the error. One of Initialization, Configuration, Connectivity Invalid data, Resources, Internal ErrorspecificFault
- A clearly worded description of this fault condition, with NO variable component (i.e. node names, port numbers, time stamps, etc.).additionalFaultText
- Any desirable additional text. The variable information.exception
- exception which causes this critical issue.
-
logMajor
public void logMajor(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of major. An SNMP notification will also be sent if one or more SNMP Trap Host (trap destinations) are defined. Based on node's Debug Level (on/off) the stack trace of passed exception is also logged.- Specified by:
logMajor
in interfaceLoggerIfc
- Parameters:
faultCategory
- A general category of the error. One of Initialization, Configuration, Connectivity Invalid data, Resources, Internal ErrorspecificFault
- A clearly worded description of this fault condition, with NO variable component (i.e. node names, port numbers, time stamps, etc.).additionalFaultText
- Any desirable additional text. The variable information.exception
- Exception which causes this major issue.
-
logMinor
public void logMinor(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of minor. An SNMP notification will also be sent if one or more SNMP Trap Host (trap destinations) are defined. Based on node's Debug Level (on/off) the stack trace of passed exception is also logged.- Specified by:
logMinor
in interfaceLoggerIfc
- Parameters:
faultCategory
- A general category of the error. One of Initialization, Configuration, Connectivity Invalid data, Resources, Internal ErrorspecificFault
- A clearly worded description of this fault condition, with NO variable component (i.e. node names, port numbers, time stamps, etc.).additionalFaultText
- Any desirable additional text. The variable information.exception
- Exception which causes this minor issue
-
logWarning
public void logWarning(String faultCategory, String specificFault, String additionalFaultText, Exception exception) Log a message to the Logger with severity of warning. An SNMP notification will also be sent if one or more SNMP Trap Host (trap destinations) are defined. Based on node's Debug Level (on/off) the stack trace of passed exception is also logged.- Specified by:
logWarning
in interfaceLoggerIfc
- Parameters:
faultCategory
- A general category of the error. One of Initialization, Configuration, Connectivity Invalid data, Resources, Internal ErrorspecificFault
- A clearly worded description of this fault condition, with NO variable component (i.e. node names, port numbers, time stamps, etc.).additionalFaultText
- Any desirable additional text. The variable information.exception
- Exception which causes this warning
-
removeLogconfig
-
getSubLogger
-