Log

Syntax

LOG { DEBUG | RELEASE | ALWAYS } [ ERROR | WARNING | HALT ]
expression [ expression ]

Parameters

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:

Log Always

The Log Always command can be used in the following three ways:

By default, the Log Always command creates an “Information” level message. You can perform any one of the following to resolve this issue:

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 = "                    "