Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6c

Application v 6.1a

  

 

Chapter SixteenApplication (continued)

EventLogOpen Function

Overview

The EventLogOpen function opens an Event Log Object opens or creates a log file.

Syntax/Parameters

Syntax

handle = EventLogOpen ( string name, [boolean overwrite], [boolean hide] );

Parameters

name

A string containing the filename for the event log. If fully qualified path and filename, the log will be expected or created at that location. If only a filename, the log will be created in the application area for the current user.

overwrite

An optional boolean value indicating to overwrite an existing log file, if present. The default value is FALSE, or append.

hide

An optional boolean value indicating whether to hide the log file if created. The default value is FALSE, or visible.

Return Value

Returns a handle for an Event Log Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve error information. The GetLastErrorMessage function may contain information to supplement the error code. Error codes match Windows system error codes (for a list, see Appendix A — Legato SDK Standard Definitions or MSDN).

Remarks

[If the name is not qualified, it is created in the user’s Application Data folder (which by default is hidden). The log can be created at any valid location as required.

[Once open or created, the handle can be used for the Event Log Object function or with the AppendMessage log function.

[After logging is complete, the handle should be closed with the CloseHandle function.

Related Functions:

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE

Page revised 2025-06-16