Skip to content

Commit

Permalink
Casting explicitly to the Message mybatis#1210
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki43zoo committed Mar 19, 2018
1 parent 8f10084 commit c54ced1
Showing 1 changed file with 7 additions and 6 deletions.
@@ -1,5 +1,5 @@
/**
* Copyright 2009-2017 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.message.SimpleMessage;
import org.apache.logging.log4j.spi.AbstractLogger;
import org.apache.logging.log4j.spi.ExtendedLoggerWrapper;
Expand Down Expand Up @@ -51,27 +52,27 @@ public boolean isTraceEnabled() {

@Override
public void error(String s, Throwable e) {
log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), e);
log.logIfEnabled(FQCN, Level.ERROR, MARKER, (Message) new SimpleMessage(s), e);
}

@Override
public void error(String s) {
log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), null);
log.logIfEnabled(FQCN, Level.ERROR, MARKER, (Message) new SimpleMessage(s), null);
}

@Override
public void debug(String s) {
log.logIfEnabled(FQCN, Level.DEBUG, MARKER, new SimpleMessage(s), null);
log.logIfEnabled(FQCN, Level.DEBUG, MARKER, (Message) new SimpleMessage(s), null);
}

@Override
public void trace(String s) {
log.logIfEnabled(FQCN, Level.TRACE, MARKER, new SimpleMessage(s), null);
log.logIfEnabled(FQCN, Level.TRACE, MARKER, (Message) new SimpleMessage(s), null);
}

@Override
public void warn(String s) {
log.logIfEnabled(FQCN, Level.WARN, MARKER, new SimpleMessage(s), null);
log.logIfEnabled(FQCN, Level.WARN, MARKER, (Message) new SimpleMessage(s), null);
}

}

0 comments on commit c54ced1

Please sign in to comment.