y-scope / clp-ffi-java

Apache License 2.0
10 stars 3 forks source link

Replace SLF4J with System.err.println to improve library compatibility (fixes #30). #31

Closed kirkrodrigues closed 1 year ago

kirkrodrigues commented 1 year ago

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: