logzio / logzio-logback-appender

Logback Appender that ships logs using HTTPs bulk
Apache License 2.0
25 stars 19 forks source link

Spring Boot crashes at startup #24

Closed totof3110 closed 7 years ago

totof3110 commented 7 years ago

Hello! (not sure if this the right place to post this...)

I just signup for Logz.io and am trying to send the logs from my Spring Boot app (1.4.1) using your logback appender. I simply added the maven dependency to my pom.xml and created a logback.xml with a copy of what's on https://app.logz.io/#/dashboard/data-sources/Java--logbackappender (everything else is default). However when I start my app with the spring-boot:run Maven plugin I get the following stack trace:

[INFO] --- spring-boot-maven-plugin:1.4.1.RELEASE:run (default-cli) @ bridge ---
SLF4J: A number (2) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
[WARNING] 
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:506)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.joran.spi.Interpreter@10:13 - RuntimeException in Action for tag [appender] java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@793032a5 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@211158b9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3]
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:205)
    at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:65)
    at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:50)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114)
    at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:299)
    at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:235)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:208)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:68)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
    at com.clevesque.bridge.Application.main(Application.java:43)
    ... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.017 s
[INFO] Finished at: 2016-11-16T19:28:08-08:00
[INFO] Final Memory: 37M/546M
[INFO] ------------------------------------------------------------------------

Any idea what I'm missing?

roiravhon commented 7 years ago

Hey @totof3110! This issue was fixed here https://github.com/logzio/logzio-logback-appender/pull/21

Can you confirm that you are using the latest version of the appender? (1.0.11)

totof3110 commented 7 years ago

Thanks for the quick reply! Upgrading to the latest appender solved the issue. I noticed you updated your docs as well. :)

roiravhon commented 7 years ago

Yep :-)

Thanks for the feedback! Please please let me know if you need any further assistance.

Roi