'log_file': Error Reporting and Log Files

'log_file' Setting Overview

Specifying the Log File

Example Program: settings_log_file

'log_file' Setting Overview

There are two options or error reporting you can set in Lycia LowCode:

To enable reporting to the log files, use the log_file setting and provide the path to the log file.

Note: This setting has to be used in pair with the startlog() function.

If log_file is not set, the error information will be displayed on the screen only.

 

Return to top

Specifying the Log File

Note: Before proceeding, get acquainted with the Settings Levels section of LyciaLowCode Settings page (the concept of scopes is essential for configuring multiple interactions and the multitable support).

The definitions like LET <setting_variable>.<setting_name> = <value> refer to the InteractForm_Settings level, while LET <setting_variable>.views["<db_table_name>"].<setting_name> = <value> refers to the View level.

This setting can be defined for:

InteractForm_Settings level: Yes

View level: No

Setting format:

<InteractForm_Settings>.log_file STRING

Example:

LET <InteractForm_Settings>.log_file = "../logs/error_log.log"

<InteractForm_Settings> here is the name for the settings variable you assign, and "../logs/error_log.log" is a path to the log file of your choice.

Note: Alternatively, you can specify this setting in JSON array in .fm2 form file by the following example: Defining Settings in .fm2 Form File.

 

Return to top

Example Program: settings_log_file

File: settings_log_file.4gl

...

FUNCTION settings_rec()

DEFINE rec_settings InteractForm_Settings

 

LET rec_settings.form_file="../settings/llc_settings_rec"

LET rec_settings.id = "settings" #settings action on append is null is identical/ LowCode action processing are managed in the 4gl code

 

LET rec_settings.log_file="settings_log_file.log"

 

#Display some information

LET rec_settings.views["test05"].navigation_status="nav_page_of" #Display current cursor location to with label by identifier

LET rec_settings.views["test05"].actions[""]["BEFORE DIALOG" ] = FUNCTION display_info

 

CALL InteractForm(rec_settings)

END FUNCTION

...

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.