Reports > 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

SEEREFERTTO 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

Presentation

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.

Close

 

Fields

The following fields are present on this tab :

Grid

  • field LIGNE

Each of the lines in the grid corresponds to a line in the log file.

Close

 

Menu Bar

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.

 When error lines are in a row they are considered as a single error line. The next line you jump to will be the first error that is not in a row.

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.

 When warning lines are in a row they are considered as a single warning line. The next line you jump to will be the first warning that is not in a row.

Menu Bar

Options / Page

Directly go to a given page. Enter this number in the opening window.

Options / Search

Search text in the log file. Enter text in the opening dialog box. If this text exists in the log file a box displays the number of occurrences found. Only relevant lines are displayed in the log screen.

Options / Errors

Choose to only display the error and warning lines in the log screen.

The total number of errors and warnings contained in the log file is initially displayed in a dialog box. Next to the error line is the line number in brackets, for example, '(5304)'. This means the error is located on page 5, line 304.

Options / Detail

If you were in partial display (when using the search function or displaying errors only), display the complete log file.

Options / Copy

Copy the log file to another file, where the absolute path is specified. This path is located by default on the application server. However, using the server@path syntax you can declare this path on a different server. The #@path syntax can be used to declare the path on the client workstation provided that this workstation runs under Windows (in Web mode, this function will be blocked by the Web browser security constraints).

Options / Sending

Send the log file by email to any group of users. The list of recipient users is entered, as well as the associated message (a default text is suggested). The email address linked to a connected user is proposed by default.

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO 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