Loki-Afro / metalarchives

Unofficial Encyclopedia Metallum API
Other
44 stars 12 forks source link

Avoid console spamming with [INFO] #16

Closed primitiveai closed 2 years ago

primitiveai commented 2 years ago

Hi, I'm trying out the example code and I faced a SLF4J issue(Failed to load class org.slf4j.impl.StaticLoggerBinder) which I resolved with their FAQs.

Now that I fixed that error, the console is flooded by [INFO] output([pool-1-thread-1] INFO com.github.loki.afro.metallum.core.util.net.downloader.AbstractDownloader - downloaded Content from [LINK]).

Is there any method for disabling logging? Thank you

Loki-Afro commented 2 years ago

SLF4J is the api, it is upon you to use whatever logging library you want, like you found out. So it is specific to your logger implementation how to change log levels.

I usually use logback.

  <logger name="com.github.loki.afro.metallum" level="ERROR">
    <appender-ref ref="STDERR" />
  </logger

or similar