MIST logger error

From DCS World Wiki - Hoggitworld.com


yourLogger:error

Added with: Mist 4.2
Description
Error logs are prefixed with 'ERROR' in DCS.log. Will be logged at level is 1 or greater.

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

Syntax
nothing yourLogger:error(string error , 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 error log message.
 local myLogger = mist.Logger:new('Daisy', 2)
 myLogger:error("I'm $1 I can't let $2 do that $3.", {'afraid', 'you', 'Dave'})
Notes:
Related Functions
new, setLevel, msg, info, warn, error, alert

Scripting Engine

MIST Root Page