On Android there is a brilliant logging library called Timber and when you log stuff with Timber.e("error") you can configure it
Android
Timber
Timber.e("error")