From 9ccdee91309e781bd621959f446cb0bc41abef62 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 18 Mar 2024 03:26:12 +0100 Subject: [PATCH] Revert "Update CoreLoggerInstance" This reverts commit d0e8e394fab89ba98cae2d05e7744c92f72fbaff. --- src/classes/loggerinstance.gd | 5 ++++- src/logger.gd | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/classes/loggerinstance.gd b/src/classes/loggerinstance.gd index 78326b3..950f326 100644 --- a/src/classes/loggerinstance.gd +++ b/src/classes/loggerinstance.gd @@ -21,12 +21,15 @@ ## you not needing to pass the [code]origin[/code] argument to each ## and every log call, which is extremely annoying. Thank us later ;) extends CoreBaseModule +extends Node class_name CoreLoggerInstance ## Class name +var logger: CoreBaseModule var origin: String -func _init(origin_new: String) -> void: +func _init(logger_new: CoreBaseModule, origin_new: String) -> void: + logger = logger_new origin = origin_new ## Prints a diagnostic message diff --git a/src/logger.gd b/src/logger.gd index 2de99b0..af6e904 100644 --- a/src/logger.gd +++ b/src/logger.gd @@ -195,4 +195,4 @@ func errorf(origin: String, message: String) -> void: _log(CoreTypes.LoggerLevel func crashf(origin: String, message: String) -> void: crash(core.basepath.replace("res://", "") + "src/" + origin, message) # Returns a logger instance -func get_instance(origin: String) -> CoreLoggerInstance: return CoreLoggerInstance.new(origin) +func get_instance(origin: String) -> CoreLoggerInstance: return CoreLoggerInstance.new(self, origin)