Try OpenEdge Now
skip to main content
DataServer for Oracle
Connecting the DataServer : Connecting a schema holder : Analyzing application execution with Enhanced Logger : DSLOG-MANAGER system handle attributes and methods
 
DSLOG-MANAGER system handle attributes and methods
The DSLOG-MANAGER system handle is similar to the LOG-MANAGER system handle. It is used to control the logging settings for the server context of the OpenEdge DataServer logging, while the LOG-MANAGER controls logging settings for OpenEdge Client and DataServer client contexts. Although both provide attributes and methods for enabling, disabling, and changing logging capabilities, the DSLOG-MANAGER applies only to DataServer components.
The DB-CONTEXT attribute must be set before any other DSLOG-MANAGER attribute can be accessed.
The following table lists the DSLOG-MANAGER system handle attributes.
Table 47. DSLOG-MANAGER system handle attributes
Attribute
Access
Function
DB-CONTEXT
Readable/Writable
Specifies the logical database name of a valid and connected data source for a supported db-type. It sets the system handle to a specific server context to enable access to other DSLOG-MANAGER attributes and methods. You can also set it to the alias of a connected data source.
ENTRY-TYPES-LIST
Readable
Returns a list of all valid entry types.
LOG-ENTRY-TYPES
Readable/Writable
Returns/Writes a list of one or more types of log entries. The default value returned by the LOG-ENTRY-TYPES attribute is the logentrytypes specified in the -Dsrv parameter when the foreign data source is connected.
LOGFILE-NAME1
Readable
Returns the name of the log file. By default, the DSLOG-MANAGER uses the dataserv.lg log file. You can change the file name by using the -dslog startup parameter from the OpenEdge client or the srvrDSLogFile UBROKER property from the DataServer broker instance. The server context cannot work without a log file open, so it cannot be changed at runtime. If the new log file fails to open, it might result in no log file being available.
LOGGING-LEVEL
Readable/Writable
Returns/Writes the level at which log entries are written. The default value returned by the LOGGING-LEVEL attribute is the logginglevel specified in the -Dsrv parameter when the foreign data source is connected.
LOG-THRESHOLD2
Readable
Returns the file size threshold of log files. When the current log file becomes equal to or greater than the specified size, OpenEdge renames and saves the log file and creates a new log file.
NUM-LOG-FILES3
Readable
Returns the number of rolled over log files to keep on disk at any one time, for an OpenEdge session, including the current log file.
HANDLE
Readable
Returns a handle.
INSTANTIATING- PROCEDURE
Readable
Returns a procedure handle for the first, or instantiating, procedure.
TYPE
Readable
Returns the type of handle.

1 The value returned by the LOGFILE-NAME is the default name dataserv.lg or; the name specified by the -dslog client startup parameter for self-service clients; the name specified by the -dslog startup parameter when ProBroker is started; the name specified by the srvrDSLogFile attribute in the ubroker.properties file when a Unified Broker instance is started for DataServer connections.

2 The value returned by the LOG-THRESHOLD is one of the following: the name specified by the -logthreshold client startup parameter for self-service clients; the name specified by the -logthreshold startup parameter when ProBroker is started; the name specified by the srvrLogThreshold attribute in the ubroker properties file when a Unified Broker instance is started for DataServer connections.

3 The value returned by the NUM-LOG-FILES is one of the following: the name specified by the -numlogfiles client startup parameter for self-service clients; the name specified by the -numlogfiles startup parameter when ProBroker is started; the name specified by the srvrNumLogFiles attribute in the ubroker.properties file when a Unified Broker instance is started for DataServer connections.

By default, the DSLOG-MANAGER uses the dataserv.lg log file. You can change the file name by using the -dslog startup parameter from the OpenEdge client or the srvrDSLogFile UBROKER property from the DataServer broker instance.
The following example tests for an active connection before setting the DSLOG-MANAGER to that connected DataServer context and getting a list of log entry types and setting a specific message inside the application at runtime.
IF CONNECTED("oradb") THEN DO:
DSLOG-MANAGER:DB-CONTEXT = ‘oradb'.
MESSAGE DSLOG-MANAGER:LOG-ENTRY-TYPES.
DSLOG-MANAGER:WRITE-MESSAGE ("Some message after connection").
END.
For more information on the DSLOG-MANAGER system handle or its attributes, see the DSLOG-MANAGER system handle reference entry in OpenEdge Development: ABL Reference.
The following table lists the functions of DSLOG-MANAGER system handle methods.
Table 48. DSLOG-MANAGER system handle methods
Method
Function
CLEAR-LOG( )
Clears all messages existing in the current client log file and leaves the file open for writing.
WRITE-MESSAGE( )
Writes user messages to the current log file.
Note: The CLOSE-LOG( ) is not a supported DSLOG-MANAGER system handle method. You cannot execute the CLOSE-LOG( ) method unless there is only one brokered DataServer server spawned by the Unified Broker or by ProBroker.