ModLoaderLog
This class provides methods for logging, retrieving logged data, and internal methods for working with log files.
Methods Overview🔗
Logging🔗
Method | Description |
---|---|
fatal |
Logs the error in red and a stack trace. Prefixed FATAL-ERROR. Note: Stops the execution in editor |
error |
Logs the message and pushes an error. Prefixed ERROR. |
warning |
Logs the message and pushes a warning. Prefixed WARNING. |
info |
Logs the message. Prefixed INFO. Most mods will use this. |
success |
Logs the message. Prefixed SUCCESS. |
debug |
Logs the message. Prefixed DEBUG. |
debug_json_print |
Logs the message formatted with [method JSON.print]. Prefixed DEBUG. |
Accessing Stored Logs Data🔗
Method | Description |
---|---|
get_all_as_resource |
Returns an array of log entries as a resource. |
get_all_as_string |
Returns an array of log entries as a resource. |
get_by_mod_as_resource |
Returns an array of log entries as a resource for a specific mod_name. |
get_by_mod_as_string |
Returns an array of log entries as a string for a specific mod_name. |
get_by_type_as_resource |
Returns an array of log entries as a resource for a specific type. |
get_by_type_as_string |
Returns an array of log entries as a string for a specific type. |
get_all |
Returns an array of all log entries. |
get_by_mod |
Returns an array of log entries for a specific mod_name. |
get_by_type |
Returns an array of log entries for a specific type. |
get_all_entries_as_string |
Returns an array of log entries represented as strings. |
Methods🔗
fatal🔗
GDScript | |
---|---|
?> Stops the execution in editor
Parameters: - message (String): The message to be logged as an error. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
error🔗
GDScript | |
---|---|
?> Always logged
Parameters: - message (String): The message to be logged as an error. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
warning🔗
GDScript | |
---|---|
?> Logged with verbosity level at or above warning (-v).
Parameters: - message (String): The message to be logged as a warning. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
info🔗
GDScript | |
---|---|
?> Logged with verbosity level at or above info (-vv).
Parameters: - message (String): The message to be logged as an information. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
success🔗
GDScript | |
---|---|
?> Logged with verbosity level at or above info (-vv).
Parameters: - message (String): The message to be logged as a success. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
debug🔗
GDScript | |
---|---|
?> Logged with verbosity level at or above debug (-vvv).
Parameters: - message (String): The message to be logged as a debug. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
debug_json_print🔗
GDScript | |
---|---|
?> Logged with verbosity level at or above debug (-vvv).
Parameters: - message (String): The message to be logged as a debug. - json_printable (Variant): The variable to be formatted and printed using [method JSON.print]. - mod_name (String): The name of the mod or ModLoader class associated with this log entry. - only_once (bool): (Optional) If true, the log entry will only be logged once, even if called multiple times. Default is false.
get_all_as_resource🔗
GDScript | |
---|---|
Returns: - Array: An array of log entries represented as resource.
get_all_as_string🔗
GDScript | |
---|---|
Returns: - Array: An array of log entries represented as strings.
get_by_mod_as_resource🔗
GDScript | |
---|---|
Parameters: - mod_name (String): The name of the mod or ModLoader class associated with the log entries.
Returns: - Array: An array of log entries represented as resource for the specified mod_name.
get_by_mod_as_string🔗
GDScript | |
---|---|
Parameters: - mod_name (String): The name of the mod or ModLoader class associated with the log entries.
Returns: - Array: An array of log entries represented as strings for the specified mod_name.
get_by_type_as_resource🔗
GDScript | |
---|---|
Parameters: - type (String): The log type associated with the log entries.
Returns: - Array: An array of log entries represented as resource for the specified type.
get_by_type_as_string🔗
GDScript | |
---|---|
Parameters: - type (String): The log type associated with the log entries.
Returns: - Array: An array of log entries represented as strings for the specified type.
get_all🔗
GDScript | |
---|---|
Returns: - Array: An array of all log entries.
get_by_mod🔗
GDScript | |
---|---|
Parameters: - mod_name (String): The name of the mod or ModLoader class associated with the log entries.
Returns: - Array: An array of log entries for the specified mod_name.
get_by_type🔗
GDScript | |
---|---|
Parameters: - type (String): The log type associated with the log entries.
Returns: - Array: An array of log entries for the specified type.
get_all_entries_as_string🔗
GDScript | |
---|---|
Parameters: - log_entries (Array): An array of ModLoaderLogEntry Objects.
Returns: - Array: An array of log entries represented as strings.
Sub-classes🔗
ModLoaderLogEntry🔗
Properties🔗
mod_name🔗
GDScript | |
---|---|
message🔗
GDScript | |
---|---|
type🔗
GDScript | |
---|---|
time🔗
GDScript | |
---|---|
time_stamp🔗
GDScript | |
---|---|
stack🔗
GDScript | |
---|---|
Methods🔗
_init🔗
GDScript | |
---|---|
Parameters: - _mod_name (String): Name of the mod or ModLoader class this entry refers to. - _message (String): The message of the log entry. - _type (String): The log type, which indicates the verbosity level of this entry. - _time (String): The readable format of the time when this log entry was created.
get_entry🔗
GDScript | |
---|---|
Returns: - String
get_prefix🔗
GDScript | |
---|---|
Returns: - String
get_md5🔗
GDScript | |
---|---|
Returns: - String
get_all_entries🔗
GDScript | |
---|---|
Returns: - Array
ModLoaderLogCompare🔗
Methods🔗
time🔗
GDScript | |
---|---|
Enumerations🔗
VERBOSITY_LEVEL🔗
GDScript | |
---|---|
Constants Descriptions🔗
LOG_NAME🔗
GDScript | |
---|---|
MOD_LOG_PATH🔗
GDScript | |
---|---|