User Tools

Site Tools


addons:using_logmanager

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

addons:using_logmanager [2017/04/22 02:31] (current)
atom0s created
Line 1: Line 1:
 +====== Using The LogManager Object ======
  
 +==== What is the LogManager Object? ====
 +
 +The LogManager object (ILogManager) is the logging object within the Ashita hook used to write to the log files. These are useful for developers when trying to gather information from users about their addons and plugins for debug purposes. ​
 +
 +Inside of addons, this object is named and accessible via: LogManager
 +
 +----
 +==== Using LogManager ====
 +
 +Please refer to the using AshitaCore documentation [[addons:​using_ashitacore|here]] for a similar experience. The object usage is the same.
 +
 +The main, and currently only, function of the log manager object can be used as:
 +
 +<sxh lua>void LogManager:​Log(level,​ source, message);</​sxh>​
 +  * **Parameters**
 +    * level - (number) The level of the log message being written.
 +    * source - (string) The source of the message, typically the function name this was invoked from.
 +    * message - (string) The message to log.
 +  * **Returns**
 +    * bool - True on success, false otherwise.
 +
 +<​html><​div class="​custom-info">​
 +Log Levels:<​br>​
 +&nbsp;0 - None - No specific level given, base line log message.<​br>​
 +&nbsp;1 - Info - Information level message.<​br>​
 +&nbsp;2 - Warn - Warning level message.<​br>​
 +&nbsp;3 - Error - Error level message.<​br>​
 +&nbsp;4 - Debug - Debug level message.<​br>​
 +</​div></​html>​
addons/using_logmanager.txt · Last modified: 2017/04/22 02:31 by atom0s