zubairehman/Flogs

Error when logging obfuscated Flutter app

matpag opened this issue · 2 comments

If I build an app with --obfuscate and --split-debug-info and try to log a crash automatically, an error is thrown at this line:

methodName = Trace.current().frames[2].member.split(".")[1];

Probably because when the Stacktrace is obfuscated it is different from the normal one.

Thanks for you feedback, will push the fix for this soon

Likewise, this pair of lines autofetching className/methodName throw exceptions when invoked from a non-class function.

ex.)

nativeCodeCallback() {
  Flog.info(text: 'Non-Class function')

}

class someClass {
...
}