Since SLF4J 2.0 seems to be incompatible with SLF4J 1.7.x providers, and this library may be used in projects that still use SLF4J 1.7.x, this PR replaces SLF4J with simple System.err.println statements.
Unfortunately, this may make debugging more difficult if users only collect their logs through logging libraries and ignore console output.
This PR also logs an error when System.loadLibrary fails (previously it was swallowed).
Validation performed
Validated that errors are printed to stderr when the library isn't found during unit tests:
Changed java.library.path to a non-existent path in maven-surefire-plugin's configuration in pom.xml
Ran the unit tests and validated that the relevant errors are printed.
References
30
Description
Since SLF4J 2.0 seems to be incompatible with SLF4J 1.7.x providers, and this library may be used in projects that still use SLF4J 1.7.x, this PR replaces SLF4J with simple
System.err.println
statements.Unfortunately, this may make debugging more difficult if users only collect their logs through logging libraries and ignore console output.
This PR also logs an error when
System.loadLibrary
fails (previously it was swallowed).Validation performed
Validated that errors are printed to stderr when the library isn't found during unit tests:
java.library.path
to a non-existent path inmaven-surefire-plugin
's configuration inpom.xml