mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
263 stars 59 forks source link

switch to slf4j #82

Open stbischof opened 3 years ago

stbischof commented 3 years ago

Since April 24, 2021 the SLF4J binding of tinylog supports also SLF4J 2.0 .

would it be an option to switch to the more used SLF4J api and let the user decide about the impl? So everyone could decide to go with tinylog or something else.

mattjlewis commented 3 years ago

Thanks for the suggestion. I won't rule this out completely for a future major release (2.0 or 3.0) as I can see the benefits, however, I am reticent to add in the short-term given the huge amount of work for limited value.

EAGrahamJr commented 1 year ago

In my opinion, the use of tinylog makes more sense for "constrained" devices -- thus makes sense as a default. If one has SLF4J dependencies, then just make sure logback is not included and use org.tinylog:slf4j-tinylog:$VERSION. The byte-sizes of the two logging frameworks are staggeringly different.

And, to be honest, tinylog has a couple of API bits that I think are more functionally useful than SLF4J (yeah, I know: heretical).