Skip to main content

 
IBM Power Systems software  >  IBM i  > Software  > 

Net.Data for i5/OS

  
Overview News Library Education Support
Error Logging

Abstract: Log error messages to a file.

What is it?
You can now indicate whether Net.Data should log error messages to a file.

Why would I want to use it?
If you are in the process of creating or enhancing a Net.Data application, you may want to log all error messages to ensure that known or expected errors are being caught by message blocks, and to track down unexpected errors.

In production phase, you would log all uncaught error messages since this would be an indication that something is wrong with your application. Periodically, one would check the error log to see if your application is working as expected.

Prior to error logging, the only way one would know that something is wrong is if someone had indicated that the application is broken.

How do I use it?
To configure Net.Data for error message logging, you need to set configuration variables to specify where the log file is stored and what level of error messages Net.Data needs to capture.

Setting the Error Log File Directory
The name of the error log file is NETDATA.ERROR.LOG. Use the DTW_ERROR_LOG_DIR configuration variable to specify the directory in which the error log file is stored.

Syntax:
DTW_ERROR_LOG_DIR [=] full_directory_path

Example:
DTW_ERROR_LOG_DIR /netdata/logs

Setting the Level of Error Logging
Determine the type of messages that Net.Data logs by setting the value of the configuration variable, DTW_ERROR_LOG_LEVEL.

Syntax:
DTW_ERROR_LOG_LEVEL [=] OFF|INFORMATION|ERROR|INFORMATION+ERROR|ALL

Where:

OFF
Specifies that no error messages are captured in the error message log. This is the default value.
INFORMATION
Net.Data will only log informational messages. Examples of informational messages includes messages that are issued when a URL is not valid, or when an HTML block is not found, etc.
ERROR
Net.Data will only log error messages that are not handled by a message block.
INFORMATION+ERROR
Net.Data will log those messages that are logged by error log levels INFORMATION and ERROR.
ALL
All messages are logged, including messages that are handled by message blocks.

Example:
DTW_ERROR_LOG_LEVEL ERROR

Availability
V4R4 and subsequent releases. Ensure you have the latest Net.Data PTF.