> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/26.-logging/26.2.-console-output.md).

# 26.2. 控制台输出

默认的日志配置会在写日志消息时将它们回显到控制台，级别为`ERROR`, `WARN`和`INFO`的消息会被记录。你可以在启动应用时，通过`--debug`标识开启控制台的`DEBUG`级别日志记录，也可以在`application.properties`中指定`debug=true`。

```
$ java -jar myapp.jar --debug
```

当debug模式启用时，一系列核心loggers（内嵌容器，Hibernate，Spring Boot等）记录的日志会变多，但不会输出所有的信息。

相应地，你可以在启动应用时，通过`--trace`（或在`application.properties`设置`trace=true`）启用"trace"模式，该模式能够追踪核心loggers（内嵌容器，Hibernate生成的schema，Spring全部的portfolio）的所有日志信息。
