So, Android built in this "feature", that any exception which has an UnknownHostException
in its cause stack will not have its stack trace logged when passed into Log.X methods... See for example the questions here or here. Or check the original commit which introduced this (n.b. the comment).
Personally I consider this to be a really stupid decision: in my case this so called feature even prevents any kind of toString()
call on my custom exceptions, so if any error or exception at any point was caused by UnknownHostException
it'll log just... nothing. :/ (Well yes, I get the timestamp, tag, etc. but no actual logged content.)
- Is there any way around this issue, except for replacing the logging framework with something else entirely?
Is there some config I haven't found or some other clever way to fix logging?