J.18 Managing Error Logging in eDirectory

Error logging is automatically started during eDirectory installation.

Message Severity Levels

All the messages have a severity level attached to it that helps you determine how critical the message is.

Error Message

Description

Fatal: A fatal message indicates a significant problem, such as loss of data or functionality.

Examples:

  • If the eDirectory server fails to load system modules like NCPEngine and DSLoader while loading modules, a fatal error is reported and logged.

  • If the eDirectory server fails to bind on secure port 636, then a fatal error is reported and logged.

Warning: A message that is not necessarily severe, but might be a possible cause for future problem.

Examples:

  • Connection failures between any two servers in tree, resulting in server getting added to bad address cache. Server can recover from this particular state by resetting the bad address cache.

  • If the LDAP client application does a bind and closes the connection without doing an unbind then LDAP server should log warning with appropriate warning message.

  • If the eDirectory server has consumed all the file descriptors and it has reached the Threshold limit as result server is not able to process any incoming requests and respond it and leading to failure of the application.

Error: A message that could be due to invalid operation, but which will not cause any problem.

Examples:

  • When an client application tries to add a object for which attributes definition are not defined In schema, then eDirectory server will report the ERR_NO_SUCH_ATTRIBUTE error.

  • When an User tries to login with an invalid password, eDirectory server will report error ERR_FAILED_AUTHENTICATION.

Information: A message that describes successful completion of an operation or event in the eDirectory server.

Examples:

  • When a module gets loaded/unloaded successfully, it may be appropriate to log an informative message of the operation.

  • When database cache configuration is changed, informative message should be logged on successfully saving the configuration.

Debug: A message that contains information which will help developers in debugging a program.

Examples:

While doing a dynamic group search, display all the dynamic group members with information of entry ID, partition ID, and DN of the members. This information will help in knowing that all members are returned at the eDirectory level.

Configuring Error Logging

Setting the Severity Level on Linux: To configure the error logging settings for the server-side messages, you can use the n4u.server.log-levels and n4u.server.log-file parameters in the /etc/opt/novell/eDirectory/conf/nds.conf configuration file.

The severity levels available are LogFatal, LogWarn, LogErr, LogInfo, and LogDbg levels (in decreasing order of severity). For more information on the severity levels, see Message Severity Levels.

By default, the severity level is set LogFatal. So, only messages with severity level fatal will be logged.

To set the severity level, use the n4u.server.log-levels parameter in the nds.conf file as follows:

n4u.server.log-levels=severity_level

For example:

  • To set the severity level to LogInfo and above, type the following:

    n4u.server.log-levels=LogInfo

    With this configuration, messages with severity level LogInfo and above (that is, LogFatal, LogWarn, and LogErr) will be logged into the log file.

  • To set the severity level to LogWarn and above, type the following:

    n4u.server.log-levels=LogWarn

    With this configuration, messages with severity level LogWarn and above (LogFatal) will be logged into the log file.

  • To set the severity level to LogDbg and above, type the following:

    n4u.server.log-levels=LogDbg

    With this configuration, messages with severity level LogDbg will be logged into the log file.

    NOTE:You must set the environment variable NDSD_EVENT_DISK_CACHE to true while setting the log level (n4u.server.log-levels) to LogDbg.

Specifying the Log File Name on Linux: To specify the location of the log file where the messages will be logged, use the n4u.server.log-file parameter in the nds.conf file. By default, the messages are logged into the ndsd.log file.

For example, to log the messages to /tmp/edir.log, type in the following:

n4u.server.log-file=/tmp/edir.log

To log the messages in the system log, use the n4u.server.log-file parameter as follows:

n4u.server.log-file=syslog

Setting the Severity Level on Windows

The severity levels available are LogFatal, LogWarn, LogErr, LogInfo, and LogDbg levels (in decreasing order of severity). For more information on the severity levels, refer to Message Severity Levels.

To set the severity level, do the following:

  1. Click Start > Settings > Control Panel > NetIQ eDirectory Services

  2. In the Services tab, select dhlog.dlm.

  3. Enter the log level in the Startup Parameters box.

    For example, to set the log level to LogErr and above, enter the following:

    LogLevels=LogErr
  4. Click Configure

  5. In the ACS Config tab, click the plus sign of DHostLogger.

    The LogLevel parameter is updated with the configured value.

    NOTE:Trace level severity does not work on Windows.

Specifying the Log File Name and Path on Windows

  1. Click Start > Settings > Control Panel > NetIQ eDirectory Services

  2. In the Services tab, select dhlog.dlm.

  3. Enter the log file path in Startup Parameters as follows:

    LogFile=file_path

    For example, to set the log file path to /tmp/Err.log, enter the following in startup parameters:

    LogFile=/tmp/Err.log
  4. Click Configure

  5. In the ACS Config tab, click the plus sign of DHostLogger.

    The LogFile parameter is updated with the configured value.

Specifying the Log File Size on Windows

  1. Click Start > Settings > Control Panel > NetIQ eDirectory Services

  2. In the Services tab, select dhlog.dlm.

  3. Enter the log file path in Startup Parameters as follows:

    LogSize=size

    The default file size is 1 MB.

  4. Click Configure

  5. In the ACS Config tab, click the plus sign of DHostLogger.

    The LogSize parameter is updated with the configured value.