Vendetta/API/log error

From Quasar-RCE
Revision as of 15:17, 3 March 2025 by Wikiadmin (talk | contribs) (created log_error)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

  1. string message: The string to store
  2. number alert_level: The type of error
  3. string mod_id: The internal id of the mod to store this log in
  4. string mod_ver: The version of the mod to store this log in

Alert levels:

1 Debugging
2 Info
3 Warning
4 Error

Returns

  1. 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.