-
Notifications
You must be signed in to change notification settings - Fork 825
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
bump: joonix/log to NewFormater() #3342
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Build Succeeded 👏 Build Id: 162ee2ba-3ca8-4b55-8a44-ae90e8580f81 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
pkg/util/runtime/runtime.go
Outdated
@@ -36,7 +36,7 @@ type stackTracer interface { | |||
|
|||
// replace the standard glog error logger, with a logrus one | |||
func init() { | |||
logrus.SetFormatter(&joonix.FluentdFormatter{}) | |||
logrus.SetFormatter(joonix.NewFormatter()) |
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.
Do the fields match exactly?
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.
the fluentd format only uses three field: "time", "severity", "message". The issue joonix/log#2 sets the default JSONFormatter with a FieldMap as a alternative.
Which i have now used in the latest commit. and removed the dependency for joonix
Can you give the log output before this change, as well as the log output after the change, for review? |
Actually then most of the dependency upgrades is unnecessary because I removed the dependency to joonix/log. |
If the log output is not affected, I believe this is a good change. |
Yeah let me first try to run it where i can see some logs. |
Build Succeeded 👏 Build Id: 0fd23497-46e3-4a51-bf31-f54a1a35cf57 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
unchanged
changed
Looks like the format of the log has changed, Can you make it consistent? @JohnnyS318 |
@@ -36,7 +35,13 @@ type stackTracer interface { | |||
|
|||
// replace the standard glog error logger, with a logrus one | |||
func init() { | |||
logrus.SetFormatter(&joonix.FluentdFormatter{}) | |||
logrus.SetFormatter(&logrus.JSONFormatter{ |
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.
We should keep the time format the same as before
Should now be fixed. The FluentDFormatter used the RFC3339Nano timestamp format |
Build Succeeded 👏 Build Id: dbcfff5a-e0ac-4a32-b940-f7909b01a088 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
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.
/lgtm
@markmandel I think this is a good change, do you have time to look at it?
LGTM, just dragging @gongmax and @zmerlynn in to triple check, since logger changes have such a wide impact. I don't think the slight change in time format should matter.
|
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.
LGTM
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aimuz, gongmax, JohnnyS318 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Actually I'm not shure why the time format has changed. I looked at the joonix/log commit specified in the dependency and it was also using RFC3339Nano as the time format. So it should be exactly equal. |
New changes are detected. LGTM label has been removed. |
Build Failed 😱 Build Id: 35661960-721d-4e8d-8066-47d6ae1e919f To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Is it possible to add a |
Build Failed 😱 Build Id: eb65a1c2-d3bc-4ec1-82f3-3a3075e5f698 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: 87d0183d-711d-4fab-8697-025324ce51e9 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind bug
What this PR does / Why we need it:
Bump the version of joonix/log to the (new)
joonix.NewFormatter()
.I would suggest to remove the dependency all together. But at least keep the version up to date.
Which issue(s) this PR fixes:
Closes #3341
Special notes for your reviewer: