SBM ModScript Reference → Programming SBM ModScript → Object Types → ADLog → ADLog Message() Method
Writes a message to Active Diagnostics.
void Message( string file, int line, int level, value ) void Message( string file, int line, int level, format, arg0-4) void Message( int level, value ) void Message( int level, format, arg0-4)
Parameter | Type | Description |
---|---|---|
file |
string |
Expected value: __FILE__ File and line provide context in the Active Diagnostics message to indicate with script and line number the message came from. |
line |
int |
Expected value: __LINE__ |
level |
int |
Corresponds to values from ADLogLevelConstants. |
value |
Variant |
Value will be converted to a string and written to the log. |
format |
string |
A format string with entries like {0} that correspond to arg0 etc. See notes below. |
arg (up to 5) |
Variant |
A value that is formatted into the output text using the format parameter. |
Type | Description |
---|---|
None |
Returns true if all applicable records are successfully updated; false otherwise. |
SBM ModScript version: 11.4.
ADLog.Message( __FILE__, __LINE__, ADLogLevelConstants.ERROR, "An informative error {0}", 5 );
The signatures that take __FILE__ and __LINE__ are preferred, as they provide script location information in the log.
The format parameter is a format string with places for up to five values in it. Those places are encoded in the string in {0} format, where the number is the zero-based index of the parameter to be placed in that location. Indexes can be repeated in the format string if that variable should be placed into the string more than one time. Literal "{" must be escaped by single ticks, literal single ticks must be escaped by single ticks.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.