<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
</dependency>
Java Codes:
Logger logger = LogManager.getLogger();
Map<String, String> map = new HashMap<>();
System.out.println(logger);
logger.info("{}-{}", System.currentTimeMillis(), map);
Output:
org.apache.logging.slf4j.SLF4JLogger@1c2c22f3
20:12:56.257 [main] INFO com.xxx - 1639051976254-1639051976254
Obviously, the correct output should be 1639051976254-{}
Does any body have the same issue?