Vendetta/API/log error
From Quasar-RCE
Jump to navigationJump to search
Definition
lib.log_error (message, [alert_level], [mod_id, mod_version]) :: nil
Description
Stores the message in Neoloader's message logging table. The message will be formatted if configured to do so by the LME. The message can also be stored in a particular mod's error table if the id and version are provided.
Arguments
- string message: The string to store
- number alert_level: The type of error
- string mod_id: The internal id of the mod to store this log in
- string mod_ver: The version of the mod to store this log in
Alert levels:
1 | Debugging |
2 | Info |
3 | Warning |
4 | Error |
Returns
- nil
Other notes
- Added in LME 2.x (Neoloader preview)
- If the user has "Echo Logging" enabled, the message will also be printed to the console. This is the default behavior of Neoloader.
- The "Formatting" of a message is to make logged errors more in line with how industry standard logs appear. This can be disabled through the config option "dbgFormatting=NO"
- If the LME's log ignore level is above the provided alert level, the log is discarded. The default is to keep alert 2 and above.