weliem / blessed-android

BLESSED, a Bluetooth Low Energy (BLE) library for Android
MIT License
557 stars 120 forks source link

Disable logging #95

Closed MDXDave closed 3 years ago

MDXDave commented 3 years ago

Can you please add the possibility to disable the logging for the library without disable the general Timber Logging for the whole app? Would be nice 😄

weliem commented 3 years ago

Hi, that is not a bad idea. I will look into it.

So do I understand it correctly that you are using Timber in you application but you want to turn off the logging done by Blessed?

Or are you using a different logger?

MDXDave commented 3 years ago

Exactly, I use Timber within my app and want to disable the logging from Blessed, without disable the logging of my app itself. 😄

weliem commented 3 years ago

I added a function central.disableLogging()

MDXDave commented 3 years ago

Thanks for your quick response and implementation! It works as expected. Thank you!

agap commented 1 year ago

Is it possible to expose the logger to the outside world? I want to be able to turn it off, but I don't use BluetoothCentralManager as I only need BluetoothPeripheral. :) So creating BluetoothCentralManager only to be able to turn logging off seems like an overkill 🤔

I can add a PR ofc, but I just wanted to know your opinion on that.

And thanks for the great library - it saved me a lot of headache!