Difference between revisions of "MIST logger new"
From DCS World Wiki - Hoggitworld.com
(No difference)
|
Latest revision as of 23:17, 13 April 2018
mist.Logger:new
Added with: Mist 4.2 |
Description |
Creates a logger object of a specified name and message level. All logs are added to your DCS.log file depending on the level set. If level is not defined a default value of 2 or "warn" will be set. |
Syntax |
object mist.Logger:new(string name , string/number level ) |
Valid Input Values: |
String must be any valid object name.
Level can be either a string or a number. The following numbers and string values are the only acceptable values: 0 = 'none' or 'off' 1 = 'error' 2 = 'warning' 3 = 'info' |
Return value: |
object |
Return example: |
Usage Examples: |
The following are different ways to make a logger.
myLogger = mist.Logger:new("MyScript") myLogger = mist.Logger:new("MyScript", 2) myLogger = mist.Logger:new("MyScript", "info") |
Notes: |
Related Functions |
new, setLevel, msg, info, warn, error, alert |