BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Programming BEA Tuxedo ATMI Applications Using C   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


Central Event Log

The central event log is a record of significant events in your BEA Tuxedo application. Messages about these events are sent to the log by your application clients and services via the userlog(3c) function.

Any analysis of the central event log must be provided by the application. You should establish strict guidelines for the events that are to be recorded in the userlog(3c). Application debugging can be simplified by eliminating trivial messages.

For information on configuring the central event log on the Windows 2000 platform, refer to Using BEA Tuxedo ATMI on Windows.

Log Name

The application administrator defines (in the configuration file) the absolute pathname that is used as the prefix of the name of the userlog(3c) error message file on each machine. The userlog(3c) function creates a date—in the form mmddyy, representing the month, day, and year—and adds this date to the pathname prefix, forming the full filename of the central event log. A new file is created daily. Thus, if a process sends messages to the central event log on succeeding days, the messages are written into different files.

Log Entry Format

Entries in the log consist of the following components:

For example, suppose that a security program executes the following call at 4:22:14pm on a UNIX machine called mach1 (as returned by the uname command):

userlog("Unknown User '%s' \n", usrnm);

The resulting log entry appears as follows:

162214.mach1!security.23451: Unknown User 'abc'

In this example, the process ID for security is 23451, and the variable usrnm contains the value abc.

If the preceding message was generated by the BEA Tuxedo system (rather than by the application), it might appear as follows:

162214.mach1!security.23451: LIBSEC_CAT: 999: Unknown User 'abc'

In this case, the message catalog name is LIBSEC_CAT and the message number is 999.

If the message is sent to the central event log while the process is in transaction mode, other components are added to the tag in the user log entry. These components consist of the literal string gtrid followed by three long hexadecimal integers. The integers uniquely identify the global transaction and make up what is referred to as the global transaction identifier, that is, the gtrid. This identifier is used mainly for administrative purposes, but it also appears in the tag that prefixes the messages in the central event log. If the system writes the message to the central event log in transaction mode, the resulting log entry appears as follows:

162214.mach1!security.23451: gtrid x2 x24e1b803 x239:
Unknown User 'abc'

Writing to the Event Log

To write a message to the event log, you must perform the following steps:

In this example, the message is sent to the central event log if tpopen(3c) returns -1.

The userlog(3c) signature is similar to that of the UNIX System printf(3S) function. The format portion of both functions can contain literal strings and/or conversion specifications for a variable number of arguments.

 

back to top previous page