进阶day13-日志框架-jar包
This commit is contained in:
BIN
javaSE-day13/lib/logback-classic-1.2.3.jar
Normal file
BIN
javaSE-day13/lib/logback-classic-1.2.3.jar
Normal file
Binary file not shown.
BIN
javaSE-day13/lib/logback-core-1.2.3.jar
Normal file
BIN
javaSE-day13/lib/logback-core-1.2.3.jar
Normal file
Binary file not shown.
BIN
javaSE-day13/lib/slf4j-api-1.7.26.jar
Normal file
BIN
javaSE-day13/lib/slf4j-api-1.7.26.jar
Normal file
Binary file not shown.
@@ -16,10 +16,10 @@ public class Demo05 {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try {
|
try {
|
||||||
// System.out.println("method方法开始执行了...");
|
// System.out.println("method方法开始执行了...");
|
||||||
LOGGER.info("method方法开始执行了...");
|
LOGGER.info("method方法开始执行了...");
|
||||||
method(100, 2);
|
method(100, 0);
|
||||||
// System.out.println("method方法执行成功了...");
|
// System.out.println("method方法执行成功了...");
|
||||||
LOGGER.info("method方法执行成功了...");
|
LOGGER.info("method方法执行成功了...");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
LOGGER.error("java.lang.ArithmeticException: / by zero");
|
LOGGER.error("java.lang.ArithmeticException: / by zero");
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
1、控制日志的输出情况:如,开启日志,取消日志
|
1、控制日志的输出情况:如,开启日志 ALL,取消日志 OFF
|
||||||
-->
|
-->
|
||||||
<root level="debug">
|
<root level="ALL">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
<appender-ref ref="FILE" />
|
<appender-ref ref="FILE" />
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
Reference in New Issue
Block a user