Programming Guide



log

Logs a message to the machine event log

Synopsis

log logEntry

Arguments

logEntry
The string to write to the log file: supply either a string constant or variable.

Environment

JetNet, Oracle Tuxedo, COM, EJB

Scope

Client, Server

Description

The log command writes an entry to the machine-specific log file. For example, you can define a server_exit handler that logs a message when the server shuts down:

proc server_exit()
log "Enterprise Bank server shutting down"
return 0

For COM/MTS applications, the log file must be named server.log and reside in the service component's application directory. log is not supported for COM/MTS clients. For more information, refer to "Logging Server Messages" in COM/MTS Guide.

Exceptions

In JetNet/Oracle Tuxedo applications, log can generate one exception:

Exception Severity Cause
TP_INVALID_CONNECTION
TP_WARNING

There is no connection to the middleware.