Initial Commit
Initial commit of Code Base.
This commit is contained in:
parent
293b1213e1
commit
c11a4ebbc2
653 changed files with 36893 additions and 1 deletions
16
addons/twitcher/logger/twitch_logger_manager.gd
Normal file
16
addons/twitcher/logger/twitch_logger_manager.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@tool
|
||||
extends RefCounted
|
||||
|
||||
## Couples the logger to the enabled state of the settings.
|
||||
class_name TwitchLoggerManager
|
||||
|
||||
static var log_registry : Dictionary = {}
|
||||
|
||||
## Register the logger and set the enabled state
|
||||
static func register(logger: TwitchLogger) -> void:
|
||||
log_registry[logger.context_name] = logger
|
||||
var property = TwitchProperty.new("twitcher/logs/%s" % logger.context_name, "off").as_select(["off", "info", "debug"])
|
||||
if property.get_val() != "off":
|
||||
logger.set_enabled(true)
|
||||
if property.get_val() == "debug":
|
||||
logger.debug = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue