Logging system failed to initialize using configuration from 'classpath:log/logback-dev.xml'

Blade 未结 2 988
yangfei
yangfei 剑者 2022-08-12 16:47

一、该问题的重现步骤是什么?

1. 安装文档部署elk

2. 启动项目elk功能,ip地址配置正确

3. user服务无法启动,提示缺少logback-dev.xml


----启动中,读取到的环境变量:[dev],

Logging system failed to initialize using configuration from 'classpath:log/logback-dev.xml'

java.lang.IllegalStateException: Logback configuration error detected: 

ERROR in ch.qos.logback.core.joran.util.PropertySetter@4dd94a58 - Could not invoke method addDestination in class net.logstash.logback.appender.LogstashTcpSocketAppender with parameter of type java.lang.String java.lang.reflect.InvocationTargetException

ERROR in net.logstash.logback.appender.LogstashTcpSocketAppender[STDOUT_LOGSTASH] - No destination was configured. Use <destination> to add one or more destinations to the appender

at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)

at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig

4. user服务已添加依赖

org.springbladeblade-starter-log

5. 该问题如何解决??

2条回答
  • 需要开启这个配置。

    6MWG}L1`B[JPS(%$V(XI311.png

    作者追问:2022-08-15 11:55

    已开启该配置,还是报错。

    image.png

    0 讨论(0)
  • 2022-12-01 22:52

    解决了吗

    0 讨论(0)
提交回复