MIST logger warn

From DCS World Wiki - Hoggitworld.com


yourLogger:warn

Added with: Mist 4.2
Description
Warning logs are prefixed with 'WARNING' in DCS.log. Will be logged as long as level is 2 or greater.

The special character "$n" value allows for easy concatenation of the error message. n being a number.

Syntax
nothing yourLogger:warn(string warning , table/multipleValues params )
Valid Input Values:
String must be any valid string entry.

Param can either be a table or multiple values. Entries will always correspond to the $n characters. For example $1 will always be the first table entry or first optional param.

Return value:
nothing
Return example:
Usage Examples:
The following creates a logger and displays a warning log message.
 local myLogger = mist.Logger:new('Totally not a dynamic campaign script', 2)
 myLogger:warn('Im afraid my $1 is $2', 'parrot', 'dead')
Notes:
Related Functions
new, setLevel, msg, info, warn, error, alert

Scripting Engine

MIST Root Page