Syntax
LOG { DEBUG | RELEASE | ALWAYS } [ ERROR | WARNING | HALT ] expression [ expression ]
Parameters
DEBUG
To log in debugger only, specify Debug.
RELEASE
To log in deployed applications specify Release.
ALWAYS
To log in both Debugger and deployed applications (Runtime) specify Always. The Runtime writes the log information in the Systems Log file and the Debugger writes the log information in the VS Output Window.
ERROR
Writes error-level events.
WARNING
Writes warning-level events.
HALT
Writes error-level events and halts logic execution.
expression (first)
The first expression to log.
expression (second)
The second expression to log.
Description
The Log logic command is supported by the Debugger in the development environment, and in Runtime on deployed applications.
During logic execution in a debug session, the Log logic command can be used to write messages to the Visual Studio Output window, in the "Debug" category. Values of up to two specified expressions can be written in response to specific system events.
Log file entries are written to the defined Agile Business Suite log file for the platform. Refer to the appropriate Agile Business Suite Runtime Administration Guide for more information. Log entries include the following information:
Date
Time
Class identifier
Version
Logging level (that is, "ERROR", "ATTENTION", or "HALT")
The first expression and its value
The second expression and its value (optional)
Log Always
The Log Always command can be used in the following three ways:
Log Always “Log Message”
Log Always Warning “Log Message”
Log Always Error “Log Message”
By default, the Log Always command creates an “Information” level message. You can perform any one of the following to resolve this issue:
In Runtime Administration Tool, set the Logging Level for the System log to “Information” or higher.
Add Error/Warning clause to the Log Always command as the second clause in LDL logic.
Examples
Example 1
In Runtime Administration Tool, the Logging Level is set to Information/Debug. Log Always “Log Message” : Writes: : Log::Info: Log Message Log Always Warning “Log Message” : Writes: : Log::Warning: Log Message Log Always Error “Log Message” : Writes: : Log::Error: Log Message
Example 2
In Runtime Administration Tool, the Logging Level is set to Warning. Log Always “Log Message” : Writes: : No logs Log Always Warning “Log Message” : Writes: : Log::Warning: Log Message Log Always Error “Log Message” : Writes: : Log::Error: Log Message
Example 3
In Runtime Administration Tool, the Logging Level is set to Error. Log Always “Log Message” : Writes: : No logs Log Always Warning “Log Message” : Writes: : No logs Log Always Error “Log Message” : Writes: : Log::Error: Log Message
Log Halt
In addition to writing error-level events, the Log Halt logic command variant also stops logic execution and displays a message in the in the Visual Studio output window.
Examples
Example 1
Log Debug Error "No Cust_ID in table." CustID : Writes: : 25Sep99 15:17:12 Cust 2.2 -- ERROR: No Cust_ID in table. CustID = "0009"
Example 2
Log Debug Error Name : Writes: : 25Sep99 15:17:12 Cust 2.2 -- ERROR: Name = " "