> 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.6.-logback-extensions.md).

# 26.6. Logback扩展

Spring Boot包含很多有用的Logback扩展，你可以在`logback-spring.xml`配置文件中使用它们。

**注** 你不能在标准的`logback.xml`配置文件中使用扩展，因为它加载的太早了，不过可以使用`logback-spring.xml`，或指定`logging.config`属性。

**警告** 这些扩展不能和`Logback`的配置扫描一起使用。如果你尝试这样做，改变配置文件会导致类似与下面的错误：

```
ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:71 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:71 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
```
