Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
LOG action
Function
Log into the log database.
Declaration
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
LOG [logMsg200[, logMsg20]] [LINENO] [PRIORITY prtyExpr_Int] |
Parameters
| logMsg200 | in | Identifier - its value is to be written into the log database (the column Incident "The cause of the event"). Maximum: 200 characters. |
| logMsg20 | in | Identifier - its values is to be written into the log database (the column New value). Maximum: 20 characters. |
| LINENO | in | Optional key wordkeyword. If it is entered, the script line the action is placed in is to be written to the log database (the column Incident "The cause of the event"). |
| prtyExpr_Int | in | Expression of the Int type, that determines a priority of storing the log into the log database. Its value must be within the range of _LOG_PRTY_INFO (0) .. _LOG_PRTY_ERROR(5). If it is not, the action generates the error _ERR_RANGE_ERROR. |
During the action declaration, at least one of the parameters
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
logMsg200, logMsg20 or LINENO |
| . |
Description
The action will perform a log into the log database. Stored logs are given by the action parameters.
Example
| Blok kódu | ||||
|---|---|---|---|---|
| ||||
BEGIN REAL _hustota, _hustota_max, _hustota_min _hustota := %Rnd() _hustota_min := 0.3 _hustota_max := 0.8 IF _hustota > _hustota_min & _hustota < _hustota_max THEN LOG "Change of density", _hustota PRIORITY _LOG_PRTY_INFO ELSE LOG "Change of density", _hustota PRIORITY _LOG_PRTY_ALARM ENDIF END |