进阶day13-日志框架-jar包

This commit is contained in:
2026-04-11 16:10:00 +08:00
parent 815c057736
commit f9191f08cc
5 changed files with 5 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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");

View File

@@ -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>