Open mkoslacz opened 7 years ago
Hey!
Not in a dev environment at the moment - but there is TraceurConfig. SHOW_ONLY_FIRST
- which will append only a single exception. Might be suitable for your use case (but could potentially remove a lot of useful info)
It would be better to be able to customise this behaviour more though - potentially by supplying a custom function to determine whether or not an exception should be appended to the stacktrace.
When I get a chance I'll take a look at implementing this!
Hi! Great library! It looks like it's not possible to set the LogLevel to SHOW_ONLY_FIRST
, or did I miss something?
Hi,
Recently I have encountered a problem using Traceur on Android.
In my project I sometimes got OOM errors when trying to log too complex
CompositeException
s from external components using AndroidLog.e
method. To avoid it I strip these exceptions to have 5 original exceptions max usingstripCompositeException
method included in the gist I linked at the end of this issue.In the regular setup this approach works correctly, but using Traceur, on less performant devices and older apis that have older memory management alghoritms (in my case API 17) I got uncaught
StackOverflowError
that crashes my app. I include the error I'm encountering in the attached test case:Although, on API 25 Traceur won't crash the app and will log the excepton correctly, but still, in such case the printed stacktrace is so huge that it fills up whole Android Logcat console and eventually breaks it with
read: unexpected EOF!
what also makes logging useless.Is it possible to create some constraints in Traceur that would prevent such issues?
I have created the test case here. Let me know if you wouldn't be able to reproduce the issue.