PreviousNextIndex

WRITE-MESSAGE( ) method

Writes a user message to the current log file.

For an interactive or batch client, 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 WebSpeed agents and AppServer servers, the WRITE-MESSAGE( ) method writes the log entries to the server log file. For DataServers, the WRITE-MESSAGE( ) method writes the log entries to the log file specified by the DataServer Logging (-dslog) startup parameter.

Note: The DSLOG-MANAGER’s LOGFILE-NAME attribute is read-only.

Return type: LOGICAL

Applies to: DSLOG-MANAGER system handle, LOG-MANAGER system handle

Syntax
WRITE-MESSAGE( msg-exp [, subsys-expr ]) 

msg-exp
subsys-expr

If the WRITE-MESSAGE( ) method succeeds, it returns TRUE. If it fails, it returns FALSE.

If there is no client log file, the WRITE-MESSAGE( ) method returns FALSE and displays a warning message indicating this operation is not valid when there is no log file. For an interactive or batch client, the WRITE-MESSAGE( ) method writes the warning message to the current output device.

When the client writes messages using the WRITE-MESSAGE( ) method, the component identifier in the message header is the default component identifier for the client executable writing to the log. For example, the component identifier for a GUI or character client is “4GL”, for WebSpeed is “WS”, and for AppServer is “AS”. You can provide your own subsystem identifier. The default is "APPL". The subsystem identifier has a character limit of 10 characters, and is padded to 10 characters.

The following is an example:

LOG-MANAGER:WRITE-MESSAGE("Got here, x=" + STRING(x), "DEBUG1"). 

The following line appears in the log file:

[04/12/05@13:19:19.742-0500] P-003616 T-001984 1 4GL DEBUG1    Got here, x=5 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex