Examples

This syntax of the logging macros is illustrated in the following examples. The two messages below are taken from the SNA Server message file; the first is a warning message with no parameters, and the second is a level 16 error message that includes one parameter.

COM0236W: DM or DISC received
COM0242E: Invalid adapter (%1) configured.
 

The following call:

COM_LOG12(236)""));
 

gives the following message in the error log:

DM or DISC received
 

The following call:

COM_LOG16(242)"%d", adptr));
 

where adptr = 17, gives the following message in the error log:

Invalid adapter (17) configured.
 

The complete message log entry contains the following information about the error or event and the service that logged it:

Date/time
User name
Computer name
Message number (event 10)
Source
Type (severity)
Message with optional parameters

The source is the name of the link service that generated the event log; for example, SNA SDLC link service.