googleapis / googleapis/google-cloud-java

[java-logging-logback] Logback encoders are not working with LoggingAppender

Đang mở
#12,011 4 bình luận 0 reaction 1 người được giao Được giao cho @cindy-peng Xem trên GitHub
api: logging priority: p3
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

Logback encoders are not working with LoggingAppender. Can encoders be used with LoggingAppender for layout/pattern usage?

#### Environment details
Need to use https://logback.qos.ch/manual/encoders.html with google-cloud-logging-logback, but it doesn't work when I use encoder with google-cloud-logging-logback version 0.130.17-alpha.

#### Steps to reproduce

1. Use LoggingAppender in logback.xml
2. Add encoder element to logback.xml.

#### Code example

```
Contents of logback.xml:




DEBUG

application.log
gae_app
com.server.utils.LoggingEnhancerSimple
WARN

%d %-5level [%thread] %logger{0}: %msg%n



```

#### Stack trace
```
In App Engine Standard Java 17 log I see this error at startup:
`ERROR in ch.qos.logback.core.joran.spi.Interpreter@12:16 - no applicable action for [pattern], current ElementPath is [[configuration][appender][encoder][pattern]]`

```

#### External references such as API reference guides

https://github.com/googleapis/java-logging-logback
See "Usage" section which says encoders can be used with LoggingAppender.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.