reines / dropwizard-logging-loggly

Dropwizard logging support for Loggly.
Apache License 2.0
7 stars 6 forks source link

Dropwizard 1.0.0 #8

Open sheldon-sminq opened 8 years ago

sheldon-sminq commented 8 years ago

There seems to be some issue in the latest release of Dropwizard

The following exception is always thrown on startup

Exception in thread "main" java.lang.AbstractMethodError
    at io.dropwizard.logging.DefaultLoggingFactory.configure(DefaultLoggingFactory.java:134)
    at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:81)
    at io.dropwizard.cli.Cli.run(Cli.java:75)
    at io.dropwizard.Application.run(Application.java:79)
sheldon-sminq commented 8 years ago

There is a change in the latest 1.0.0 version to AbstractAppenderFactory

scottaj commented 8 years ago

We just ran into this today and hacked together a patch to get it working again: https://github.com/campspot/dropwizard-logging-loggly/tree/dropwizard-1.0

That implementation works for the default JSON format and compiles with Dropwizard 1.0.0. It needs more work to be in a state to merge upstream though. Hopefully I can do that some time in the next couple weeks.

sheldon-sminq commented 8 years ago

Any updates on this? how do i use the hotfix branch in my maven pom.xml?

scottaj commented 8 years ago

@sheldon-sminq We are using the patched file by loading it into a local maven repository that is checked into our project. You should be able to do the following steps to do the same thing:

1) create an empty directory in the project where you want to include the local maven repository, e.g. I made a top level lib directory. 2) add the local directory to your project as a repository, something like this:

<repositories>
    <repository>
      <id>my-local-repo</id>
      <url>file://${basedir}/lib</url>
    </repository>
  </repositories>

3) checkout our hotfix branch: https://github.com/campspot/dropwizard-logging-loggly/tree/dropwizard-1.0 4) run mvn package on the hotfix branch 5) install the hotfixed jar to the local repository you created above, something like this: mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file -Dfile="../../dropwizard-logging-loggly/target/dropwizard-logging-loggly-0.9-SNAPSHOT.jar" -DgroupId="com.jamierf.dropwizard" -DartifactId="dropwizard-logging-loggly" -Dversion="0.9-SNAPSHOT" -Dpackaging="jar" -DlocalRepositoryPath="./lib" 6) Back in the project where you want to include the dependency, add it with the new version to your pom:

<dependency>
      <groupId>com.jamierf.dropwizard</groupId>
      <artifactId>dropwizard-logging-loggly</artifactId>
      <version>0.9-SNAPSHOT</version>
    </dependency>

I've got a lot going on right now, so it may be a while before I can get back to trying to merge this into the mainline (though anyone else is welcome to grab my hotfix and take a stab at that)

sheldon-sminq commented 7 years ago

We have started using this hotfix and there seems to be an issue, logs just stop showing up in loggly after a while. Have you faced any such issue?

sheldon-sminq commented 7 years ago

is this related the the batch appender change you recently added?

scottaj commented 7 years ago

Yeah, we were having issues with exactly that, but only after we fixed the access logs. The batch appender seemed to fix that. Are you using the version with the access logs and batch appender?

We've unfortunately had a couple stability issues in our app the last couple days and we are worried it is related to the log appender.

sheldon-sminq commented 7 years ago

Yes referred to this fix

https://github.com/campspot/dropwizard-logging-loggly/tree/fix-request-logging

On Thu, Oct 13, 2016 at 10:07 AM, Al Scott notifications@github.com wrote:

Yeah, we were having issues with exactly that, but only after we fixed the access logs. The batch appender seemed to fix that. Are you using the version with the access logs and batch appender?

We've unfortunately had a couple stability issues in our app the last couple days and we are worried it is related to the log appender.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reines/dropwizard-logging-loggly/issues/8#issuecomment-253412575, or mute the thread https://github.com/notifications/unsubscribe-auth/ALMWfGUhhpWfGuwiEq5w4LOgVKKdfegdks5qzbVsgaJpZM4JV-GD .

sheldon-sminq commented 7 years ago

Are these issues related to CPU? we too seem have some issue we see large CPU spikes every few secs on the app.

scottaj commented 7 years ago

Have not had that issue thus far, want to move this discussion over to an issue on our fork? I feel like we are getting very off topic for this ticket.