Skip to content

Commit

Permalink
Don't create logger in MixinServiceAbstract ctor, updates #569
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumfrey committed May 15, 2024
1 parent e212511 commit 54f3644
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ public abstract class MixinServiceAbstract implements IMixinService {
protected static final String MIXIN_PACKAGE = "org.spongepowered.asm.mixin.";
protected static final String SERVICE_PACKAGE = "org.spongepowered.asm.service.";

/**
* Logger adapter, replacement for log4j2 logger as services should use
* their own loggers now in order to avoid contamination
*/
private static ILogger logger;

/**
* Cached logger adapters
*/
Expand All @@ -86,12 +80,6 @@ public abstract class MixinServiceAbstract implements IMixinService {
*/
private String sideName;

protected MixinServiceAbstract() {
if (MixinServiceAbstract.logger == null) {
MixinServiceAbstract.logger = this.getLogger("mixin");
}
}

/* (non-Javadoc)
* @see org.spongepowered.asm.service.IMixinService#prepare()
*/
Expand Down Expand Up @@ -226,7 +214,7 @@ public final String getSideName() {
return this.sideName = side;
}
} catch (Exception ex) {
MixinServiceAbstract.logger.catching(ex);
this.getLogger("mixin").catching(ex);
}
}

Expand Down

0 comments on commit 54f3644

Please sign in to comment.