External-ccm: Use appropriate method for printf-style log calls#524
Open
HadrienPatte wants to merge 1 commit intooracle:masterfrom
Open
External-ccm: Use appropriate method for printf-style log calls#524HadrienPatte wants to merge 1 commit intooracle:masterfrom
HadrienPatte wants to merge 1 commit intooracle:masterfrom
Conversation
zap's sugared logger `Fatal`/`Error`/`Info`/`Debug` methods treat their
first argument as a plain string, not a format string. Passing format
verbs like `%s`/`%v` without the 'f' suffix causes them to appear
literally in log output instead of being interpolated.
Example of a log with no printf formatting we can see today:
```
2026-03-06T21:08:01.983Z FATAL FSS csi-controller-driver/oci-csi-controller-driver.go:56 Failed to run the CSI driver for %s.FSS {"component": "csi-controller", "error": "failed to remove unix domain socket file /var/run/shared-tmpfs/csi-fss.sock"}
```
Also removed a duplicated error from a log in `node_info_controller.go`
where `err` was attached to the log both with `zap.Error(err)` and
through a (broken) printf-style `%v`.
Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
AkarshES
approved these changes
Mar 9, 2026
Contributor
AkarshES
left a comment
There was a problem hiding this comment.
Thanks for making these fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zap's sugared logger
Fatal/Error/Info/Debugmethods treat their first argument as a plain string, not a format string. Passing format verbs like%s/%vwithout the 'f' suffix causes them to appear literally in log output instead of being interpolated.Example of a log with no printf formatting we can see today:
Also removed a duplicated error from a log in
node_info_controller.gowhereerrwas attached to the log both withzap.Error(err)and through a (broken) printf-style%v.