You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason for this is, if you have multiple components for example, I use get_it to inject my logger into these components to collect all log data in one place (FileOutput, whatever.). But I can't figure out which log comes from what component. Maybe just an optional tag attribute like the guy did in the PR.
The text was updated successfully, but these errors were encountered:
The original PR is creating rather big breaking API changes, which I would like to avoid for the most part.
However, as there is currently no way in Dart to add optional positional and optional named parameters in the same method signature, this would require at least some breaking changes anyway.
My two cents on the discussion:
It isn't really comparable with Android's Log as this is a static class and after all logger has been created to be usable with multiple instances and possibly a custom PrefixPrinter.
On the other side, an optional TAG parameter could be helpful, this would allow people to tag their logging using a single (possibly static) instance.
Is there a chance to add a tag feature to the logger?
There was already a PR on the old repo:
[Feature] Add 'TAG' options #103
And here is a discussion:
simc/logger#68 (comment)
The reason for this is, if you have multiple components for example, I use get_it to inject my logger into these components to collect all log data in one place (FileOutput, whatever.). But I can't figure out which log comes from what component. Maybe just an optional tag attribute like the guy did in the PR.
The text was updated successfully, but these errors were encountered: