Log reading

Functions that need to be run for an extended amount of time, in particular those operating in batch mode, generate a log file with a detailed report including errors, if any.

These log files are created in the folder directory, in subdirectory TRA. The filename takes the format F#.tra, where # is a sequence number assigned by the [C]NUMIMP counter.

The first line of the log file is structured as follows:

#<AdxVJ>@(#)%I% DD-MM-YY hh:mm:ss (user code) Explanatory comment

The first part of the log (in bold) is a standard header. This is followed by the date and time, the code of the user who launched it, the function and then an explanatory function.

Following this the log displays the lines created by the executed function. If the line refers to an error found in the function, these lines are prefixed by the characters > or < followed by an error number.

Prerequisites

See also Refer to documentation Implementation

Screen management

Enter the log file name. A selection window is available to select existing files.

Once you have selected a file the log file is displayed.

Entry screen

The log file screen displays up to 1,000 lines in the log file. If there are more than 1,000 lines in the log file radio buttons are enabled and the log file is 'cut' into logical « pages » containing up to 1,000 lines each. You can use the radio buttons to move to the next page, the previous page, or to go to the first page or the last page. The current page number and the total number of pages in the file are displayed in the title of the grid containing the lines.

Next error

Click the Next error action to navigate through the log file by jumping to the lines where an error is found. If the error is not present in the current 1,000 line page this action triggers the display of the next page of 1,000 lines where an error occurred.

 

Next warning

Click the Next warning action to navigate through the log file by jumping to the lines where a warning is found. If the warning is not present in the current 1,000 line page this action triggers the display of the next page of 1,000 lines where a warning was triggered.

 

Error messages

The only error messages are the generic ones.

Tables used

See also Refer to documentation Implementation

Technical setting up of log files

The developer manages a log file using the following functions:

Call OUVRE_TRACE("COMMENT") From LECFIC

# Open a log file

Call ECR_TRACE("Message",err) From GESECRAN

# Write to the log file
# if err=0 : Information
# if err>0 : Error displayed in color 1 (red)
# if err<0 : Information displayed in color 2 (blue or green)
# if err=-2 : Information displayed in color 3 (green or blue)

Call FERME_TRACE From LECFIC

# Close the log file

Call LEC_TRACE From LECFIC

or

Call SUPP_TRACE From LECFIC

or

Call CONS_TRACE From LECFIC

# Read the log file


# Remove log file after reading


# Read log file without being able to remove it

# = 1 or position TRA in action CONTROL Model GTRAITE
# 8 to read the log file without being able to remove it
# 9 to read the log file and automatically remove it after reading