You can write user messages to the current log file by using the WRITE-MESSAGE( ) method on the LOG-MANAGER system handle.

Note: For interactive or batch clients, the WRITE-MESSAGE( ) method writes the log entries to the log file specified by the LOGFILE-NAME attribute or the Client Logging (-clientlog) startup parameter. For the PAS for OpenEdge agent log, the WRITE-MESSAGE( ) method writes the log entries to the server log file.

The following table shows how to write messages to the log file.

Table 1. Writing messages to the log file
Method General syntax Example
LOG-MANAGER system handle
LOG-MANAGER:WRITE-MESSAGE(  msg-exp[, subsys-expr] )
LOG-MANAGER:WRITE-MESSAGE("Got here: x=" + string(x), "DEBUG1").

The following line appears in the log file:

[06/10/31@13:19:19.742-0500] P-003616 T-001984 1 4GL DEBUG1    Got here: x=5

For a detailed description of the LOG-MANAGER system handle, see ABL Reference.