How can MyBatis output log information to the screen?
To output the log information of MyBatis to the screen, you can follow these steps:
<settings>
<setting name="logImpl" value="STDOUT_LOGGING" />
...
</settings>
- implement logging
- LOG4J is the acronym for Log for Java, which is a popular logging library used in Java applications.
- Log4j2
<settings>
<setting name="logImpl" value="LOG4J" />
...
</settings>
- the logging feature in the Apache iBATIS library
public class CustomLogImpl implements Log {
...
}
<settings>
<setting name="logImpl" value="com.example.CustomLogImpl" />
...
</settings>
With the above configuration, you can now have MyBatis log information displayed on the screen.