SourceHorizon / logger

Small, easy to use and extensible logger which prints beautiful logs.
https://pub.dev/packages/logger
MIT License
197 stars 33 forks source link

Allow switching out LogFilter globally #34

Closed yangsfang closed 1 year ago

yangsfang commented 1 year ago

Fixes #33

Bungeefan commented 1 year ago

Thanks for your PR, unfortunately I am having troubles merging it, as it contains the (already merged) commit of your other pull request. Can you please fix this?

And please use one branch per PR in the future.

yangsfang commented 1 year ago

This branch has no conflicts with the base branch

I don't see any conflicts at the moment. Perhaps there was an error right after you merged the other change, and it resolved itself (as it should, because it should figure out the changes are the same and ignore the base commit similar to how git does rebase).

it contains the (already merged) commit of your other pull request

Sorry about that. I first did the README fix and thought I didn't need a new branch. And then later I made another change and found out I needed a new branch (to allow you to merge the README change independently). I was a bit lazy so I just branched off the modified master. I'll make sure I use a new branch for each in the future.

Edit: I fixed the commit tree anyway, just in case. Thanks.

Bungeefan commented 1 year ago

There is no "conflict", it's that GitHub wants to merge your 2 commits, even though the first is already on the master. This would be resolved my creating an ugly merge commit with duplicated changes, therefore, I asked you to fix it on your branch before I am continuing merging it.

yangsfang commented 1 year ago

Done. Thanks.

Bungeefan commented 1 year ago

Thanks for fixing it, merged!

Bungeefan commented 1 year ago

Unfortunately, I had to revert your pull request as I found an error. We cannot provide a static field which contains an instance of the default filter, as then the same filter instance will be applied to all loggers, interfering with the log level. But we can provide static functions which can be replaced with your desired default filter.