xmpp
xmpp

Reputation: 75

How to disable inherited logback?

in my Maven project I am using an external library (namely parallec.io) which uses LogBack as their logging framework and has logback.xml file packed into the JAR. I know it is considered a bad practice to pack logback.xml, but the developer somehow did it. In fact, I need nothing of that wordy output (e.g. how it inicializes etc) so would be happy to disable logback at all. I am not very much into the logging thing, but I realized I need to create logback.xml and configure logging using it, but the problem is the conflicting file from the library. I tried this solution http://www.mkyong.com/maven/maven-exclude-logback-xml-in-jar-file/ but it did change nothing as far as I can see.

So if some one could suggest me a quick way to just get read of logging (or at list exclude that default logback.xml) I'd really appreciate it.

Upvotes: 4

Views: 3392

Answers (1)

xmpp
xmpp

Reputation: 75

Okay here's what I did, so thanks to px5x2 for the trick.

<dependency>
 <groupId>io.parallec</groupId>
 <artifactId>parallec-core</artifactId>
 <version>0.9.1</version>
 <exclusions>
 <exclusion> 
     <groupId>ch.qos.logback</groupId>
     <artifactId>logback-core</artifactId>
  </exclusion>
  <exclusion> 
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
  </exclusion>
</exclusions>
</dependency>

Upvotes: 2

Related Questions