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
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.
Grid
| field LIGNE |
|
Each of the lines in the grid corresponds to a line in the log file. |
Menu Bar
Menu Bar
|
Directly go to a given page. Enter this number in the opening window. |
|
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. |
|
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. |
|
If you were in partial display (when using the search function or displaying errors only), display the complete log file. |
|
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). |
|
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
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 |
|
|
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 |