Logs and logging

User-defined logs

Application logs

WebServer logs

LyciaStudio logs

Lycia Form Designer logs

Log file is a file that records either events that occur when applications are run or messages sent between different computer systems and tools.

Log files are generally used for testing, debugging, and troubleshooting.

There are several groups of logs created by different Lycia components:

By default = immediately after you have installed Lycia,

Error logs

Error logs (also called startlogs) are log files initialized by the 4gl developer from a 4gl application.

Error logs store error messages obtained when your 4gl applications are run.

Error logs are created by startlog() - the function that initializes error logging and opens the error log file:

CALL startlog("new_program")

CALL startlog("new_program.txt")

CALL startlog("C:\my_work\my_logs\new_program.txt")

If the path you specified for storing error logs doesn't exits, Lycia will create it automatically.

If you do not specify the path, error log will be stored in the same folder as the executable file of the program in which the error log is initialized.

Error logs get their entries by errorlog(). This means that error logs can include not only error messages but also user messages added by the 4gl developer to the 4gl code by errorlog().

Details of the error message depend on what object_cache is used - release or debug.

With release cache, line info is usually excluded:

Date: 04/16/2018 Time: 13:17:26

An exception (error) is being handled.

The error code (9230) was received.

Invalid form: root container is missing

Form new_program is invalid. Root container is missing.

With debug cache, line info is included:

Date: 04/16/2018 Time: 13:17:26

An exception (error) is being handled.

Module: new_program.exe [0000000a]

File: new_program.4gl

line 3 (1-12)

Function: main

The error code (9230) was received.

Invalid form: root container is missing

Form new_program is invalid. Root container is missing.

If necessary, you can switch on the line info for release cache by setting the QX_REL_LINE_INFO environment variable before building the object_cache:

QX_REL_LINE_INFO=1

Error messages written to error logs also depend on the WHENEVER statement. For example, with WHENEVER ANY ERROR CONTINUE, errors will be skipped and runtime and error messages will not be written to error logs.

Error logs are appended after every application launch:

Date: 12/28/2017 Time: 13:17:26

An exception (error) is being handled.

The error code (9230) was received.

Invalid form: root container is missing

Form new_program is invalid. Root container is missing.

 

Date: 12/28/2017 Time: 13:23:55

An exception (error) is being handled.

The error code (9230) was received.

Invalid form: root container is missing

Form new_program is invalid. Root container is missing.

 

Date: 12/28/2017 Time: 13:28:08

An exception (error) is being handled.

The error code (9230) was received.

Invalid form: root container is missing

Form new_program is invalid. Root container is missing.

You can also write to the error logs file using errorlog():

CALL errorlog("Unexpected error encountered")

or

CALL errorlog(err_get(-999))

 

Application logs

Application logs (also called qrun logs and runtime logs) are logs initialized at the moment of application launch.

Application logging is initialized (and a log file is created) every time you run the application.

Application log files are located in the folder specified in listener.xml by the tag <logdir>...</logdir>. By default, it is:

C:\ProgramData\Querix\Lycia\logs
/opt/Querix/Lycia/logs

The name of the application log files includes the application name and the timestamp:

<application_name>.<timestamp>.log

For example,

test.exe.2017-12-28_21.36.30.814.log

The content of an application log file is determined by these environment variables:

QXDEBUG

QX_REL_LINE_INFO

LYCIA_SEVERITY

QX_TRACE

QX_TRACE_ARG_DUMP

LYCIA_POST_MORTEM_LENGTH

 

If the inet.env configuration file is not generated, you should create it and set the QXDEBUG environment variable set to QXDEBUG=mv.

If you do not change the inet.env, then your application log will include:

By setting environment variables, you can make application logs more detailed:

QXDEBUG

logs debugging results, e.g.,

object_cache info,

errors and warning states,

SQL issues and errors,

messages passing between client and server, etc.

QX_REL_LINE_INFO

switches on line info for release cache

LYCIA_SEVERITY

specifies the logging level for the application.

Allow logging:

runtime errors,

potentially harmful runtime situations,

operations that occur on a non-recurrent basis, and

all the steps performed by the application.

QX_TRACE

enables tracing of function calls for user-defined functions

QX_TRACE_ARG_DUMP

enables tracing of both function calls for user-defined functions and their arguments

LYCIA_POST_MORTEM_LENGTH

specifies how many last log messages are written to the application log file when an application crashes

To include object_cache information to the application logs, you must set these environment variables and their values to inet.env:

QXDEBUG=PzVzT

LYCIA_SEVERITY=TRACE

QX_TRACE=1

QX_TRACE_ARG_DUMP=1

 

Web server logs

Web server logs are log files that log the operation of the application server (currently, Jetty).

Web server logging is initialized when Querix Lycia Web Application Server is started.

Web server log files are located in the Jetty logs folder:

C:\ProgramData\Querix\Lycia\jetty\logs
/opt/Querix/jetty/logs

In its default configuration, Lycia Web Server:

commons-daemon.<date>.log

logs the start of the Querix Lycia Web Application Server

qxweb_7-stderr.<date>.log

captures and logs all STDERR output

qxweb_7-stdout.<date>.log

captures and logs all STDOUT output

Here is an example of commons-daemon.<date>.log file:

[2018-04-16 14:14:36] [info] [ 3032] Commons Daemon procrun (1.0.15.0 64-bit) started

[2018-04-16 14:14:36] [info] [ 3032] Running 'qxweb_7' Service...

[2018-04-16 14:14:36] [info] [ 3672] Starting service...

[2018-04-16 14:14:38] [info] [ 3672] Service started in 1555 ms.

You can learn more about Jetty logs here and here.

 

LyciaStudio logs

LyciaStudio logs are log files that log the operation of LyciaStudio.

As LyciaStudio is based on the standard Eclipse IDE, LyciaStudio logs are a part of the Eclipse logs.

You can learn more about Eclipse logs here.

LyciaStudio logs are created when you create a new workspace.

LyciaStudio logging is initialized every time when you start LyciaStudio.

LyciaStudio logs are located in the .metadata of your workspace. By default, it is:

C:\Users\<user>\workspace\.metadata\.log
/home/<user>/workspace/.metadata/.log

LyciaStudio logs append after every session that had an issue.

Here is an example of one entry in the LyciaStudio log:

!SESSION 2018-04-16 11:52:13.356 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0_141

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Command-line arguments: -os win32 -ws win32 -arch x86_64

!ENTRY com.querix.fgl.core 4 0 2017-11-30 13:31:57.376

!MESSAGE Error parsing compiler output for file C:\Users\user\workspace\new_project\source\new_program.ad2

. Reason: The content of elements must consist of well-formed character data or markup.

Compiler ouput:C:\Users\user\workspace\new_project\source\new_program.out:1.1: syntax error, unexpected <, expecting LAYOUT or SCREEN

You can view LyciaStudio logs in the Error Log view.

 

Lycia Form Designer logs

Lycia Form Designer logs are log files that log the operation of Lycia Form Designer.

Immediately after you have installed Lycia, Lycia Form Designer logging is switched off.

To get Lycia Form Designer logs, you must add these properties to lyciastudio.ini after -vmargs:

-Dcom.querix.fgl.forms.designer.renderer=cef

-Dcom.querix.fgl.forms.designer.render.arg.log-file=c:/temp/ceftmp.log

-Dcom.querix.fgl.forms.designer.render.arg.log-severity=verbose

-Dcom.querix.fgl.forms.designer.jslog=C:/temp/fd_scripts.js

Lycia Form Designer logging is initialized created when you open an .fm2 form in the Design mode.

Lycia Form Designer logs are:

By default (as you have configured above), Lycia Form Designer logs are located:

c:/temp/ceftmp.log
/tmp/ceftmp.log

and

C:/temp/fd_scripts.js
/tmp/fd_scripts.js

Lycia Form Designer logs are overwritten every time when you open an .fm2 form in the Design mode.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.