W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
可使用org/springframework/cloud/gcp/autoconfigure/logging/logback-appender.xml
使用Stackdriver附加程序。此附加程序從JUL或Logback日志條目構(gòu)建Stackdriver Logging日志條目,向其添加跟蹤ID,然后將其發(fā)送到Stackdriver Logging。
STACKDRIVER_LOG_NAME
和STACKDRIVER_LOG_FLUSH_LEVEL
環(huán)境變量可用于自定義STACKDRIVER
附加程序。
然后,您的配置可能如下所示:
<configuration> <include resource="org/springframework/cloud/gcp/autoconfigure/logging/logback-appender.xml" /> <root level="INFO"> <appender-ref ref="STACKDRIVER" /> </root> </configuration>
如果要對日志輸出進行更多控制,則可以進一步配置附加程序。可以使用以下屬性:
Property | 默認值 | 描述 |
---|---|---|
|
|
The Stackdriver Log name. This can also be set via the |
|
|
If a log entry with this level is encountered, trigger a flush of locally buffered log to Stackdriver Logging. This can also be set via the |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: