skrapeit / skrape.it

A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML (server & client-side rendered). It places particular emphasis on ease of use and a high level of readability by providing an intuitive DSL. It aims to be a testing lib, but can also be used to scrape websites in a convenient fashion.
https://docs.skrape.it
MIT License
790 stars 57 forks source link

[BUG] logback.xml in jar #221

Open chuey619 opened 1 year ago

chuey619 commented 1 year ago

It appears that in the published jar, the logback.xml configuration was bundled with the library which is causing warnings to appear for users of the library that have their own logback.xml in their project.

22:03:44,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 22:03:44,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Volumes/GradleBuildRAMDisk/api/api/resources/main/logback.xml] 22:03:44,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/abc/.gradle/caches/modules-2/files-2.1/it.skrape/skrapeit-browser-fetcher/1.1.5/428cea6d688faf0c7f59bc099be7edcb49d3b2a3/skrapeit-browser-fetcher-1.1.5.jar!/logback.xml]

chriptus13 commented 4 months ago

I was testing this library in a spring boot application where I have a custom logback-spring.xml configuration and suddenly my logs are different 😅

Setting logging.config explicitly does the job!