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

DevelopmentFilter should not check against assert, #63

Closed cedvdb closed 6 months ago

cedvdb commented 7 months ago

Reconsider the design decision of not enabling logs when asserts are disabled: Development filter would allow everything that is above the log level, as one would expect, whether asserts are enabled or not.

Bungeefan commented 6 months ago

Hi! First, I think it's quite sensible to disable logging by default in production, especially if one of the main use cases is an embedded app on a device that has no console output. But I agree, the name DevelopmentFilter can be confusing at first.

Second, the library doesn't "make that decision for you", it provides a reasonable but configurable default. You don't have to like it, but you can easily change it to your preference. Just set the filter to the provided ProductionFilter which behaves exactly the way you want it to.

By the way, it indeed works the way it is "intended", maybe not the way some people expect (understandably), but still as intended. Actually, #57 has helped to improve the documentation on this one.

cedvdb commented 6 months ago

especially if one of the main use cases is an embedded app on a device that has no console output

That's where I disagree: That's opinion based at this point, if the library is designed around flutter and console output so be it, so I'm closing this.