Skip to content

Commit

Permalink
consider level configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed Mar 24, 2024
1 parent a42974d commit b384474
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.comroid.mcsd.spigot;

import lombok.Value;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
Expand Down Expand Up @@ -29,6 +30,8 @@ public RabbitAppender(MCSD_Spigot plugin) {

@Override
public void append(LogEvent event) {
if (event.getLevel().intLevel() < plugin.getConsoleLevel().intValue())
return;
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(event.getTimeMillis());
var str = "[%tT %s] [%s]: %s".formatted(
Expand Down

0 comments on commit b384474

Please sign in to comment.