Closed ryanadrig closed 5 months ago
Same here. if i put logger statement somewhere in begging of async code it does not trigger async suspension. but if it is somewhere in middle throws a suspension
Hi, unfortunately, I think I am not quite able to understand your issue.
What do you mean by "is thrown in every call to lg.d"?
@aalpersen, regarding <asynchronous suspension>
, this expression is not an exception nor an error, just a notice regarding your async code flow. More information: https://github.com/flutter/flutter/issues/28588#issuecomment-468160204.
My guess would be that you are confusing an exception stack trace with the default stack trace that is printed by PrettyPrinter
's methodCount
(default = 2
), which is even printed when no exception was provided.
Actually, the methodCount
is only used when no exception was provided.
Additionally, the output is just a stack trace (obtained via StackTrace.current
) and not an exception.
Without more information, I am not able to assist you any further. Therefore, I am going to close this issue.
Logger works seemingly normally except in async functions, where it still outputs the desired log but gets extra exceptions thrown compared to print. I tested this in two places. Here is a minimal example of my settings.
TestDelHTTP.<anonymous closure>
is thrown in every call to lg.d, andTestDelHTTP.<asynchronous suspension>
is thrown in the "then" block, but no exceptions are thrown just using print.