Porovnávané verzie

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
languageesl
themeConfluence
 LOG [logMsg200[, logMsg20]] [LINENO] [PRIORITY prtyExpr_Int]
Parameters


logMsg200inIdentifier - its value is to be written into the log database (the column Incident). Maximum: 200 characters.
logMsg20inIdentifier - its values is to be written into the log database (the column New value). Maximum: 20 characters.
LINENOinOptional key word. If it is entered, the script line the action is placed in is to be written to the log database (the column Incident).
prtyExpr_IntinExpression of 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
languageesl
themeConfluence
logMsg200, logMsg20 or LINENO
must be defined.


Description
The action will perform a log into the log database. Stored logs are given by the action parameters.
Example


Blok kódu
languageesl
themeRDark
 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 

Info
titleRelated pages:

Script actions
LOGEX
READLOG