You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/04/16 06:20:34 UTC

[GitHub] [skywalking] hefangqiang opened a new issue #6767: 8.5.0 日志收集问题

hefangqiang opened a new issue #6767:
URL: https://github.com/apache/skywalking/issues/6767


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [√ ] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### 问题描述
   刚升级为8.5.0版本,日志收集报错,但在8.4.0是可以的 
   
   ### 代码展示:
       
   ```
    <dependency>
             <groupId>org.apache.skywalking</groupId>
             <artifactId>apm-toolkit-logback-1.x</artifactId>
             <version>8.5.0</version>
    </dependency>
   ```
   配置logback日志
   ```
       <!-- 日志收集 -->
       <appender name="grpc-log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender"/>
   
       <!-- 控制台输出 -->
       <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
           <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
               <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
                   <Pattern><![CDATA[%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} [%X{tid}] %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}]]></Pattern>
               </layout>
           </encoder>
       </appender>
   
       <root level="info">
           <appender-ref ref="console" />
           <appender-ref ref="grpc-log" />
       </root>
   ```
   ### 报错
   ```
   Exception in thread "main" java.lang.IllegalStateException: Logback configuration error detected: 
   ERROR in org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender[grpc-log] - No encoder set for the appender named "grpc-log".
   	at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
   	at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:222)
   	at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73)
   	at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
   	at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
   	at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:306)
   	at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281)
   	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
   	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
   	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80)
   	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
   	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
   	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
   	at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
   	at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
   	at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
   	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80)
   	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
   	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
   	at com.haier.fin.operate.example.ExampleApplication.main(ExampleApplication.java:21)
   
   Process finished with exit code 1
   
   ```
   
   
   8.4.0采用该方式可以正常收集日志,升级为8.5.0后便出现了上面的异常,想请教一下 8.5.0的日志配置方式是否发生了变化


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 commented on issue #6767: 8.5.0 日志收集问题

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #6767:
URL: https://github.com/apache/skywalking/issues/6767#issuecomment-820943212


   Please use English when asking question in a global community.
   
   Yes the configuration is enhanced to support log format, please read https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Application-toolkit-logback-1.x.md#grpc-reporter


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] hefangqiang commented on issue #6767: 8.5.0 日志收集问题

Posted by GitBox <gi...@apache.org>.
hefangqiang commented on issue #6767:
URL: https://github.com/apache/skywalking/issues/6767#issuecomment-820944134


   Thank you for your, I will pay attention to using English in the future


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] kezhenxu94 closed issue #6767: 8.5.0 日志收集问题

Posted by GitBox <gi...@apache.org>.
kezhenxu94 closed issue #6767:
URL: https://github.com/apache/skywalking/issues/6767


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org