class
Log
Used for logging messages.
Messages can be categorized and filtered by verbosity, the log can be saved to a file and send out callbacks when a new message is added.
Public
Constructors
Log
Methods
~Log
LogMessage
Logs a new message.
- message
- The message describing the log entry.
- verbosity
- Verbosity of the message, determining its importance.
- categoryName
- Category of the message, determining which system is it relevant to.
Clear
Removes all log entries.
Clear
Removes all log entries for a specific category and/or verbosity level.
- categoryName
- Name of the category to clear. Specify empty string to clear all categories.
- verbosity
- Verbosity level to clear.
GetUnreadEntry
Returns the latest unread entry from the log queue, and removes the entry from the unread entries list.
- outEntry
- Entry that was retrieved, or undefined if no entries exist.
Returns: True if an unread entry was retrieved, false otherwise.
GetLastEntry
Returns the last available log entry.
- outEntry
- Entry that was retrieved, or undefined if no entries exist.
Returns: True if an entry was retrieved, false otherwise.
GetHash
Returns a hash value that is modified whenever entries in the log change.
This can be used for checking for changes by external systems.
staticSetCategoryMaximumVerbosity
Changes the maximum verbosity for a particular log category.
Verbosity levels higher than specified verbosity will not be logged.
Internal
Methods
staticRegisterCategory
Registers the new category object.
staticUnregisterCategory
Unregisters an existing category object.
Private
Methods
staticGetCategoriesMap
Returns a modifyable map containing all the log categories.
GetAllEntries
Returns all log entries, including those marked as unread.