-
Notifications
You must be signed in to change notification settings - Fork 10
Allow customization of the logger with NewWith #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customization of the logger with NewWith #4
Conversation
I'm not sure why the lint test is failing; based on the logs it looks like it passed? |
(clicked the wrong button) |
I'll try to fix linter today. I'll also look into MR. From a quick glance I think we may just need single |
I used |
I personally don't have much an issue with removing If we don't want to do that we'd just need to follow something like this: https://blog.jetbrains.com/go/2020/03/25/working-with-go-modules-versioning/#major-version-upgrading or https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher. I would recommend the following (untested but seems reasonable):
|
I know what you mean and I'd follow a protocol, but I still consider this lib to be a beta for some reason. I think introducing v1 and v2 that early may be more confusing than a tiny API change. I hope I won't offend anyone by merging what's in front of us and just bumping version to 1.0 (it is a major version bump so may introduce breaking changes). Planned to bump to 1.0 after EC2 default metrics/dimensions will be sorted (see TODO in readme), but I'm not a heavy EC2 user, so cannot fix it properly. |
Sounds good. Thanks for merging! |
This PR primarily addresses #3 by allowing for the timestamp to be customized when creating the logger. Instead of bumping the MV or creating a breaking change I introduced a new method,
NewWith
, which uses functional options to customize the logger.New
andNewFor
were updated to simply callNewWith
with the correct values to keep their output consistent.The PR also:
New
andNewFor
. I could see an argument to NOT deprecateNew
so let me know if you'd like that designation removed..gitignore
to call out what.idea/
is. IMO this line shouldn't even be there and should instead be added to the developer's local.gitignore
but not a hill I'm willing to die on :)prettier
.NewWith
.