Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 890
xmpp Avatar asked Oct 26 '25 03:10

xmpp


1 Answers

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>
like image 177
xmpp Avatar answered Oct 28 '25 15:10

xmpp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!