-
Notifications
You must be signed in to change notification settings - Fork 228
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
remove unnecessary log info #2723
Conversation
@@ -526,7 +526,7 @@ func (ap *addressPool) releaseAddress(address string, options map[string]string) | |||
var err error | |||
|
|||
logger.Info("Releasing address with", zap.String("address", address), zap.Any("options", options)) | |||
defer func() { logger.Error("Address release completed with", zap.String("address", address), zap.Error(err)) }() | |||
defer func() { logger.Error("Address release completed with", zap.Error(err)) }() |
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.
why are we removing address field.. this helps in debugging
} | ||
}() | ||
|
||
// Look up the endpoint. | ||
ep, err := nw.getEndpoint(endpointID) | ||
if err != nil { | ||
logger.Error("Endpoint not found. Not Returning error", zap.String("endpointID", endpointID), zap.Error(err)) | ||
logger.Error("Endpoint not found. Not Returning error", zap.Error(err)) |
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.
can we log endpoint id in different way instead of removing it?
@@ -293,7 +293,7 @@ func (as *addressSpace) requestPool(poolId string, subPoolId string, options map | |||
var ap *addressPool | |||
var err error | |||
|
|||
logger.Info("Requesting pool with", zap.String("poolId", poolId), zap.Any("options", options), zap.Any("v6", v6)) | |||
logger.Info("Requesting a new address pool") |
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.
Since you are removing details about the request, is this line needed at all? I'm asking because without any info, the log line cannot be correlated to other things. It mostly indicates that the function was invoked, but you also have a log line below that accomplishes the same thing (I don't see a code path where the other line does not get called).
} else { | ||
logger.Info("Releasing pool as there are no allocations", zap.String("poolId", poolId)) | ||
logger.Info("Releasing pool as there are no allocations") |
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.
why remove pool id?
This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days |
Pull request closed due to inactivity. |
Reason for Change:
This PR is to remove some unnecessary logs from CNI
Issue Fixed:
Requirements:
Notes: