Skip to content

Conversation

@Pavani-Panakanti
Copy link
Collaborator

Issue #, if available:
All application logging has stack depth of 2 for caller. For the controller logger we have stack depth of 0. As we have set global caller stack depth of 2 so it is logging an error in container logs for creating logger for controller runtime

2025-08-27 04:20:32.080917205 +0000 UTC Logger.check error: failed to get caller

Description of changes:
For controller logger use stack depth of 0 for caller. Rest all application logging uses stack depth of 2

Testing
Above error does not appear in container log after the fix

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Pavani-Panakanti Pavani-Panakanti requested a review from a team as a code owner August 27, 2025 18:45
Copy link
Contributor

@jaydeokar jaydeokar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@viveksb007 viveksb007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any example log of what kind of logging is done by this controller-runtime?

checking if its possible to remove this logger setting here altogether https://github.com/aws/aws-network-policy-agent/blob/2db0a7833a8aae9dd77c27578cb09b1dd2cca09d/main.go#L76C2-L76C53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants