See Also

ITLogMsg Class  | ITLogMsg Members

Language

Visual Basic

C#

JScript

Show All

See AlsoLanguages ItLogLib2DotNet Send feedback on this topic to support@itech-software.com.

AddParam Method

Adds a named parameter including its value to the logmessage. See the Remarks section below.

AddParam is overloaded for several basic parameter value types (string, character, integer, float (single) and double) and has two option parameters (flags).

Its general form is:

AddParam(string ParameterName, type ParameterValue [, bool CopyValueToMsgText] [, bool CopyParamNameToMsgText]);

Overload List

Adds a named Double parameter including its value to the logmessage, leaving the Text property of the ITLogMsg object unchanged.

Adds a named Double parameter including its value to the logmessage and also appends the parameter value to the Text property of the ITLogMsg object, if you set the CopyValueToMsgText flag.

Adds a named Double parameter including its value to the logmessage and also appends the parameter name and value to the Text property of the ITLogMsg object, depending on the values you give in the CopyValueToMsgText and CopyParamNameToMsgText flags.

Adds a named integer parameter including its value to the logmessage, leaving the Text property of the ITLogMsg object unchanged.

Adds a named integer parameter including its value to the logmessage and also appends the parameter value to the Text property of the ITLogMsg object, if you set the CopyValueToMsgText flag.

Adds a named integer parameter including its value to the logmessage and also appends the parameter name and value to the Text property of the ITLogMsg object, depending on the values you give in the CopyValueToMsgText and CopyParamNameToMsgText flags.

Adds a named character parameter including its value to the logmessage, leaving the Text property of the ITLogMsg object unchanged.

Adds a named character parameter including its value to the logmessage and also appends the parameter value to the Text property of the ITLogMsg object, if you set the CopyValueToMsgText flag.

Adds a named character parameter including its value to the logmessage and also appends the parameter name and value to the Text property of the ITLogMsg object, depending on the values you give in the CopyValueToMsgText and CopyParamNameToMsgText flags.

Adds a named Single parameter including its value to the logmessage, leaving the Text property of the ITLogMsg object unchanged.

Adds a named Single parameter including its value to the logmessage and also appends the parameter value to the Text property of the ITLogMsg object, if you set the CopyValueToMsgText flag.

Adds a named Single parameter including its value to the logmessage and also appends the parameter name and value to the Text property of the ITLogMsg object, depending on the values you give in the CopyValueToMsgText and CopyParamNameToMsgText flags.

Adds a named string parameter including its value to the logmessage, leaving the Text property of the ITLogMsg object unchanged.

Adds a named string parameter including its value to the logmessage and also appends the parameter value to the Text property of the ITLogMsg object, if you set the CopyValueToMsgText flag.

Adds a named string parameter including its value to the logmessage and also appends the parameter name and value to the Text property of the ITLogMsg object, depending on the values you give in the CopyValueToMsgText and CopyParamNameToMsgText flags.

Remarks

About user-defined parameters in logmessages

Basically all the parameters you add using the ITLogMsg.AddParam methods are stored as an attribute of the logmessage, like its timestamp, Loglevel, Text and so on, but freely defined by you. You are even free to use a name like "LogLevel" for a parameter, since the parameters use a namespace of their own.

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

Future support of parameters

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.

Current support for parameters

Already today the use of AddParam 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 iTech Logging supports parameters like follows:

See Also

ITLogMsg Class  | ITLogMsg Members

 

 


(c) 2002-2004 iTech Software GmbH, Berlin. Version 2.4, Wed 07 Jul 2004.