Logging

Runtime log messages are stored in a catalogue file. NNSYMessageLog.nml is the New Era of Networks standard log file. This file appears in the local directory when an adapter is run. The file resides in a directory specified by the following:

<"NNSY_ROOT">/NNSYCatalogues/<language code>, where <"NNSY_ROOT">/NNSYCatalogues/en_US is an example.

If the NNSY_ROOT environment variable is not set, the e-ADK attempts to find the catalogue files in the runtime directory ./NNSYCatalogues/xxxx, where xxxx is the code set (for example: en_US). If the files are not found, the following message is put to the output log file, NNSYMessageLog.nml:

"Could not find a valid message catalogue containing messages for component ’ADK Message Set’."

If NNSYMessageLog.nml file cannot be created or cannot be written to, log information is written to standard error. Developers can create a NNSYMessageLog. nml file that is write-protected, and the output will be channeled to the screen.

New Era of Networks has a standard format for logged messages. The format is:

CCYYMMDDhhmmsslllZ|<process name>|<process ID>|<thread ID>|

<correlation ID>|<class>|<code>|<severity>|<file>|<line>|

<text>

Each logged message is contained on a single line that can wrap. Each message is delimited by a newline character.