flutter-fimber
flutter-fimber copied to clipboard
Support stacktrace info on web
It looks like the class/method names that I get on Android with Fimber does not work the same way on web. I'd like to be able to log the calling class and method name on web, too.
Thank you for reporting this.
I will take a look at this, do you use fimber or flutter_fimber?
I might update the latter to packaged plugins.
I'm fine using either one, though if this is implemented at the fimber level then I assume it would work for any Dart project?
I found reason why on web the index of stacktrace (that fimber takes to get line's and tag for it) is blank.
The Web dart code adds 4 steps into the stacktrace.

I need "smarter" way to detect the caller's place.
- find 'log' index on the stacktrace
- +2 from 'log' index to get the value - in above it would be
Maybe just <fn> is not enough and other callers could be added, but probably that is separate issue
Does this help? https://pub.dev/packages/stack_trace
It is one way to parse it, I hoped to not get any dependency for this simple logging package. I will review this and its output. But it still would need to have different index of the stack per web or native, which can change every new flutter release version.
Thanks for reminding me about this.