Fix codepart identification for logger instances

This commit is contained in:
JeremyStar™ 2024-06-27 19:26:25 +02:00
parent d40ba11266
commit 9e4cfee89a
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
8 changed files with 15 additions and 9 deletions

View file

@ -20,6 +20,7 @@
package de.staropensource.sosengine.base.utility; package de.staropensource.sosengine.base.utility;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import lombok.Getter; import lombok.Getter;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -85,7 +86,7 @@ public class PropertyParser {
*/ */
public PropertyParser(@NotNull Properties properties) { public PropertyParser(@NotNull Properties properties) {
this.properties = properties; this.properties = properties;
this.logger = new LoggerInstance(new LogIssuer(getClass(), String.valueOf(properties.hashCode()))); this.logger = new LoggerInstance(new LogIssuer(getClass(), String.valueOf(properties.hashCode()), CodePart.ENGINE));
} }
/** /**

View file

@ -59,7 +59,7 @@ public class ShortcodeConverter {
* @see LoggerInstance * @see LoggerInstance
* @since 1-alpha0 * @since 1-alpha0
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* Constructor. * Constructor.

View file

@ -23,6 +23,7 @@ import de.staropensource.sosengine.base.annotations.EventListener;
import de.staropensource.sosengine.base.classes.events.EventPriority; import de.staropensource.sosengine.base.classes.events.EventPriority;
import de.staropensource.sosengine.base.classes.helpers.EventHelper; import de.staropensource.sosengine.base.classes.helpers.EventHelper;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import de.staropensource.sosengine.base.utility.Miscellaneous; import de.staropensource.sosengine.base.utility.Miscellaneous;
import de.staropensource.sosengine.graphics.GraphicsSubsystem; import de.staropensource.sosengine.graphics.GraphicsSubsystem;
@ -63,7 +64,7 @@ public final class OpenGlSubsystem implements ApiMainClass {
* @see LoggerInstance * @see LoggerInstance
* @since 1-alpha0 * @since 1-alpha0
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* The Graphics API's management class. * The Graphics API's management class.

View file

@ -21,12 +21,12 @@ package de.staropensource.sosengine.graphics.opengl.classes;
import de.staropensource.sosengine.base.classes.types.Vec2i; import de.staropensource.sosengine.base.classes.types.Vec2i;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent; import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent;
import lombok.Getter; import lombok.Getter;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.lwjgl.opengl.GL; import org.lwjgl.opengl.GL;
import org.lwjgl.system.MemoryUtil;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
@ -61,7 +61,7 @@ public class Window implements de.staropensource.sosengine.graphics.classes.Wind
* @see LoggerInstance * @see LoggerInstance
* @since 1-alpha0 * @since 1-alpha0
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* The window name. * The window name.

View file

@ -25,6 +25,7 @@ import de.staropensource.sosengine.base.classes.SubsystemMainClass;
import de.staropensource.sosengine.base.classes.helpers.EventHelper; import de.staropensource.sosengine.base.classes.helpers.EventHelper;
import de.staropensource.sosengine.base.events.internal.InternalEngineShutdownEvent; import de.staropensource.sosengine.base.events.internal.InternalEngineShutdownEvent;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import de.staropensource.sosengine.base.utility.ListFormatter; import de.staropensource.sosengine.base.utility.ListFormatter;
import de.staropensource.sosengine.base.utility.Miscellaneous; import de.staropensource.sosengine.base.utility.Miscellaneous;
@ -63,7 +64,7 @@ public final class GraphicsSubsystem implements SubsystemMainClass {
* @see LoggerInstance * @see LoggerInstance
* @since 1-alpha0 * @since 1-alpha0
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* A list of all registered Graphics APIs. * A list of all registered Graphics APIs.

View file

@ -22,6 +22,7 @@ package de.staropensource.sosengine.graphics.vulkan;
import de.staropensource.sosengine.base.annotations.EventListener; import de.staropensource.sosengine.base.annotations.EventListener;
import de.staropensource.sosengine.base.classes.events.EventPriority; import de.staropensource.sosengine.base.classes.events.EventPriority;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import de.staropensource.sosengine.base.utility.Miscellaneous; import de.staropensource.sosengine.base.utility.Miscellaneous;
import de.staropensource.sosengine.graphics.GraphicsSubsystem; import de.staropensource.sosengine.graphics.GraphicsSubsystem;
@ -60,7 +61,7 @@ public final class VulkanSubsystem implements ApiMainClass {
* @see LoggerInstance * @see LoggerInstance
* @since 1-alpha0 * @since 1-alpha0
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* The Graphics API management class. * The Graphics API management class.

View file

@ -22,6 +22,7 @@ package de.staropensource.sosengine.slf4j_compat;
import de.staropensource.sosengine.base.classes.SubsystemMainClass; import de.staropensource.sosengine.base.classes.SubsystemMainClass;
import de.staropensource.sosengine.base.events.LogEvent; import de.staropensource.sosengine.base.events.LogEvent;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import lombok.Getter; import lombok.Getter;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -49,7 +50,7 @@ public class Slf4jCompatibilitySubsystem implements SubsystemMainClass {
private static Slf4jCompatibilitySubsystem instance = null; private static Slf4jCompatibilitySubsystem instance = null;
/** {@inheritDoc} */ /** {@inheritDoc} */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.ENGINE));
/** /**
* Constructor. * Constructor.

View file

@ -22,6 +22,7 @@ package de.staropensource.sosengine.testapp;
import de.staropensource.sosengine.base.Engine; import de.staropensource.sosengine.base.Engine;
import de.staropensource.sosengine.base.classes.types.Vec2i; import de.staropensource.sosengine.base.classes.types.Vec2i;
import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.LogIssuer; import de.staropensource.sosengine.base.types.LogIssuer;
import de.staropensource.sosengine.graphics.GraphicsSubsystem; import de.staropensource.sosengine.graphics.GraphicsSubsystem;
import de.staropensource.sosengine.graphics.classes.ApiMainClass; import de.staropensource.sosengine.graphics.classes.ApiMainClass;
@ -67,7 +68,7 @@ public class Main {
* *
* @see LoggerInstance * @see LoggerInstance
*/ */
private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass())); private final LoggerInstance logger = new LoggerInstance(new LogIssuer(getClass(), CodePart.APPLICATION));
/** /**
* Constructor. * Constructor.