diff --git a/pom.xml b/pom.xml
index 6b6542523a1..677aa197fe5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,7 +184,7 @@
org.apache.logging.log4j
log4j-core
- 2.5
+ 2.11.0
true
diff --git a/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java b/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java
index 52bde61a0fb..e8ac38d0d47 100644
--- a/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java
+++ b/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java
@@ -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.
@@ -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;
@@ -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);
}
}