About user-defined parameters in logmessages

This topic explains the idea behind the ITLogMsgAddParam functions.

Basically all the parameters you add using this methods are stored as an attribute of the logmessage, like its timestamp, Loglevel and so on, but freely defined by you.

 

Depending on the values of the option flags (last two parameters) in the call to ITLogMsgAddParam, the parameter is not necessarily seen in the logmessage text. The latter is just another, different attribute of the logmessage.

 

In a future version ITLogBook will be enabled to evaluate the parameters of the logmessages, so that you can display them in extra columns and use them in your filters definitions.


Already
today the use of LogMsgAddParam is strongly recommended, since this will enable you to make use of the described ITLogBook features in the future without reworking your programs then. Recompiling and relinking should suffice in that case.

 

The current version (version 2) of ITL supports parameters like follows:

·      The option flags bCopyValueToMsgText and bCopyParamNameToMsgText are fully implemented.

·         The parameters are not really stored in the logfile. Instead they are added (dumped) in a human-readably format at the end of the text of logmessage they belong to, so you can inspect the values from within ITLogBook.
You can even define filters in ITLogBook that make use of that dump (using string-search filters -- named Custom filters -- in ITLogBook). But be aware that the dump will be probably removed when parameters are fully implemented!