Closed andrei-toterman closed 1 month ago
Hi, good idea!
I tried to create a customizable but still backwards-compatible API for a custom DateTime
format.
Could you please check out the date_time_format
branch and let me know if this would fulfill your use-case? (feel free to provide other feedback as well)
You should be able to just add this to your pubspec.yaml
:
dependency_overrides:
logger:
git:
url: https://github.com/SourceHorizon/logger
ref: date_time_format
Hey! Yes, I think that is a pretty cool feature. It's nice that you have the power to format it however you like but you also get some defaults to choose from. Thanks!
Thanks for the nice feedback, that's exactly what I was aiming for.
Since this isn't yet in the main
branch, I would like to keep the issue open until it is merged.
PrettyPrinter
only prints the time of a log event, but not the date, and I think it would be very useful to get that information. Perhaps it could be even more configurable by adding aprintDate
parameter, so things remain backwards compatible.