Skip to content

Commit c54ced1

Browse files
committed
Casting explicitly to the Message #1210
1 parent 8f10084 commit c54ced1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/java/org/apache/ibatis/logging/log4j2/Log4j2AbstractLoggerImpl.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2017 the original author or authors.
2+
* Copyright 2009-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020
import org.apache.logging.log4j.Level;
2121
import org.apache.logging.log4j.Marker;
2222
import org.apache.logging.log4j.MarkerManager;
23+
import org.apache.logging.log4j.message.Message;
2324
import org.apache.logging.log4j.message.SimpleMessage;
2425
import org.apache.logging.log4j.spi.AbstractLogger;
2526
import org.apache.logging.log4j.spi.ExtendedLoggerWrapper;
@@ -51,27 +52,27 @@ public boolean isTraceEnabled() {
5152

5253
@Override
5354
public void error(String s, Throwable e) {
54-
log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), e);
55+
log.logIfEnabled(FQCN, Level.ERROR, MARKER, (Message) new SimpleMessage(s), e);
5556
}
5657

5758
@Override
5859
public void error(String s) {
59-
log.logIfEnabled(FQCN, Level.ERROR, MARKER, new SimpleMessage(s), null);
60+
log.logIfEnabled(FQCN, Level.ERROR, MARKER, (Message) new SimpleMessage(s), null);
6061
}
6162

6263
@Override
6364
public void debug(String s) {
64-
log.logIfEnabled(FQCN, Level.DEBUG, MARKER, new SimpleMessage(s), null);
65+
log.logIfEnabled(FQCN, Level.DEBUG, MARKER, (Message) new SimpleMessage(s), null);
6566
}
6667

6768
@Override
6869
public void trace(String s) {
69-
log.logIfEnabled(FQCN, Level.TRACE, MARKER, new SimpleMessage(s), null);
70+
log.logIfEnabled(FQCN, Level.TRACE, MARKER, (Message) new SimpleMessage(s), null);
7071
}
7172

7273
@Override
7374
public void warn(String s) {
74-
log.logIfEnabled(FQCN, Level.WARN, MARKER, new SimpleMessage(s), null);
75+
log.logIfEnabled(FQCN, Level.WARN, MARKER, (Message) new SimpleMessage(s), null);
7576
}
7677

7778
}

0 commit comments

Comments
 (0)