Itiviti / simple-slack-api

(simple) Java Slack client library
470 stars 193 forks source link

ch.qos.logback runtime dependencies cause unwanted and excessive logging from other libraries #59

Open KidCrippler opened 8 years ago

KidCrippler commented 8 years ago

SimpleSlackAPI is packaged with 2 logging jars from package ch.qos.logback as maven runtime dependencies. For some reason, that causes the couchbase java connector to print tons of logging messages in DEBUG level. I would only assume that it would be the same for other libraries that use SLF4J. I'm not an expert on maven packaging, but other libraries (including couch) know how to "hide" the fact that they use a logger without exposing it to the outside world.

As a quick and dirty workaround, I had to manually exclude the 2 jars from my pom.xml file, but that doesn't feel right at all.

10x

jgangemi commented 8 years ago

this project shouldn't have a compile time dep on logback. instead it should use the provided scope so it's optional to the end user.

did you also notice that you need to exclude junit b/c it gets brought in as a compile time option? that's the fault of json-simple though.

gluck commented 8 years ago

+1, logback shouldn't appear in the compile deps. irt json-simple/junit dep, we can exclude it from the transitive deps, however we should probably get away from json-simple, the project seems dead and although junit has been moved to test scope, no release has been done since.

xtechgamer735 commented 8 years ago

The amount of logging is ridiculous! There should be options to remove it.

bcorne commented 8 years ago

@xtechgamer735 : This library relies on slf4j as a logger facade, depending on the logging framework you're plugging to it you should be able to configure the log output and filter out the messages you're not interested in. Here's a few link to setup some logging framework :

Best regards,

Benoit

xtechgamer735 commented 8 years ago

I think I've got it fixed. Thanks!

KidCrippler commented 8 years ago

Please do share

xtechgamer735 commented 8 years ago

I excluded log back from shading in maven