Mahoney / slf4j-test

Implementation of SLF4J which allows easy access to logging events in tests
39 stars 24 forks source link

Compatibility with SLF4J 2.0 #34

Open mthmulders opened 1 year ago

mthmulders commented 1 year ago

First of all, thank you for maintaining this very useful utility!

Unfortunately, starting with SLF4J 2.0, it doesn't work anymore. SLF4J 2.0 changed the way it discovers implementations. Quoting from their documentation:

Instead of "bindings" now org.slf4j.LoggerFactory searches for "providers".

Although I'm not an expert on SLF4J, I managed to implement such a provider. If you're open to such a contribution, I can create a PR for it.

valfirst commented 1 year ago

@mthmulders here is a fork with SLF4J 2.0 support: https://github.com/valfirst/slf4j-test

Hakky54 commented 2 weeks ago

This is also an alternative for slf4j-test which works with slf4j 2.0 https://github.com/Hakky54/log-captor