Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.6.4 MessageEventLog (output a message to the application log in Event Viewer)

Purpose

Outputs a message to the application log in Event Viewer.

Syntax
MessageEventLog (Text, [LogType] [, Option])
Arguments
Text

Specify the message to be output to Event Viewer. Write a character string or a variable that stores this value. If #Option = NOCHANGE is missing from the head of the script file, any \r, \n, \t, or \\ strings included in the message text are processed as control codes.

For details about control codes, see 6.1.11 Script coding conventions.

LogType

Specify the type of events for message output as one of the following values:

Value

Meaning

Error or Err

Error

Warning

Warning

Information or Info

Information

AuditSuccess

Audit successful

AuditFailure

Audit failed

This value is optional. If you omit this value, Information is assumed.

Option (from version 06-51)

Specify the following optional value:

Value

Meaning

TextOnly

Do not prefix the message with the user's name and executed script file name. Output only the message specified in Text.

Description

The MessageEventLog command outputs a message to the application log at Event Viewer according to the specified parameters. The command returns True on successful execution, or False if an error occurs.

Messages output using this command have 3 as their event ID. Unless you specify TextOnly in the Option argument, the output messages are prefixed with the user's name and executed script file name.

The MessageEventLog command is executed even if the parameter /NOEVLOG or /NOEVLOG(3) is set in the command line defined in the execution environment file or in the command line set in the registry.

Example
If Exec ("ABC.EXE", True) = False Then
  MessageEventLog ("ABC.EXE call failed.", Error)
End
JP1/Script version

Supported from JP1/Script 01-01.