-
Notifications
You must be signed in to change notification settings - Fork 742
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
Zap logger #824
Zap logger #824
Conversation
5aba5b9
to
10aafc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Added a few comments so far.
Could you add some sample output in the overview as well?
fad5934
to
43eefe7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stay with this, @nithu0115. A number of things to address but it's getting there. :)
0d38b18
to
beb584c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nithu0115, still some work left to do on this one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @jaypipes and sorry for the delay. I was sick 🤒 I will work on the feedback and update you.
3bb2821
to
d017743
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks a lot for all this works. Some comments... :)
cmd/aws-k8s-agent/main.go
Outdated
const ( | ||
defaultLogFilePath = "/host/var/log/aws-routed-eni/ipamd.log" | ||
) | ||
const binaryName = "L-IPamD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ipamd
is a fine abbreviation of "IP Address Management Daemon". The Linux part is not needed, and neither the special casing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, TIL that the "L-" stands for "Linux"...
Agreed, though, that "ipamd" is a better and more Linux-appropriate daemon name.
If you make this change in a future PR, however, please remember to update https://github.com/awslabs/amazon-eks-ami/blob/master/log-collector-script/linux/eks-log-collector.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
ipamd
is a fine abbreviation of "IP Address Management Daemon". The Linux part is not needed, and neither the special casing.
I wanted it to be consistent with the log message. I can change it to "ipamd".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only required change here is the need to restore the MTU config default check. Otherwise, looks excellent, thanks!
596375b
to
f0629f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some tiny things left, almost there!
@@ -256,7 +254,7 @@ func (d *Controller) handlePodUpdate(key string) error { | |||
d.workerPodsLock.Lock() | |||
defer d.workerPodsLock.Unlock() | |||
|
|||
log.Tracef("Update for pod %s: %+v, %+v", podName, pod.Status, pod.Spec) | |||
log.Debugf("Update for pod %s: %+v, %+v", podName, pod.Status, pod.Spec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might become too verbose, since it is printing the full pod.Spec
on every pod update on the node. The info level log on line 267 is probably enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to leave it as is for now as this will provide us some better info while troubleshooting.
cfd3162
to
a00483a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased, updated as per comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with this. A future commit can get rid of the DefaultLogger module-level log variables, but I think getting the number of logging libraries down to just one (and a tested, vetted one that is maintained) is worthwhile.
d5ef59b
to
4387b7c
Compare
Issue #, if available: #511
Description of changes:
Adding zap logger
Outputs
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.