Previous Topic

Book Contents

Book Index

Next Topic

Writing Messages to the Log

To write a message to the system log file, call

Application.logMessage(String, aLogLevel)

Writes a custom message to the standard Valuemation log file, to which system calls including exceptions are normally listed. The message can be tagged with one of the following constants, which describe the category (level) of the message, which go from the most important to the least important. The last three, most detailed levels (5 to 7) are not used frequently.

LOG_EXCEPTION = 0;

LOG_ERROR = 1;

LOG_WARN = 2;

LOG_INFO = 3;

LOG_CONFIG = 4;

LOG_DEBUG = 5;

LOG_FINE = 5;

LOG_FINER = 6;

LOG_FINEST = 7

As a parameter, you can use either the name of the constant preceded by the name of the Application object as you set it (for example, oVM.LOG_ERROR) or simply an integer as the number of the level (0).

Example - Logging messages to the Valuemation log

We assume that you have run Valuemation and logged in correctly before starting this code. oVM variable now holds Application object. See Login Syntax for the section of the opening code.

oVM.logMessage ("Hello from the script", oVM.LOG_ERROR)

See Also

Setting Up Valuemation Environment

Getting Valuemation Version

Information About the Running Platform

Memory Services

Main Parameters

User_Admin Mode

Selecting Language

Localizing Messages