-
Notifications
You must be signed in to change notification settings - Fork 225
Comparing changes
Open a pull request
base repository: kubernetes/klog
base: v2.90.0
head repository: kubernetes/klog
compare: v2.90.1
- 12 commits
- 14 files changed
- 4 contributors
Commits on Jan 24, 2023
-
klog: support writing formatted buffer through logger
This is meant to be used with textlogger for the non-structured log calls to avoid double encoding.
Configuration menu - View commit details
-
Copy full SHA for 81f97ff - Browse repository at this point
Copy the full SHA 81f97ffView commit details -
textlogger: write unstructured klog output directly
Textlogger can (but doesn't have to) be used to write klog's unstructured output from calls like Infof directly to the output stream. This has two advantages: - traditional output remains exactly the same as before, which is particularly important for multi-line messages because those get quoted otherwise - performance is better because re-encoding the output string is avoided
Configuration menu - View commit details
-
Copy full SHA for 7a9f099 - Browse repository at this point
Copy the full SHA 7a9f099View commit details
Commits on Feb 2, 2023
-
ktesting: use klog-like header
In practice, replacing normal klog text output with ktesting lost the time stamps. This is perhaps not important for unit tests, but for benchmarking those can be crucial. Now ktesting uses a stripped down klog header: - The source code location comes first, because that is printed by the testing package. - Instead if INFO and ERROR, the short I and E are used. - The useless tid/pid part isn't present. Example: $ go test -v ./ktesting/example/ === RUN TestKlogr example_test.go:45: I0201 17:58:36.235936] hello world example_test.go:46: E0201 17:58:36.236052] failed err="failed: some error" example_test.go:47: I0201 17:58:36.236086] verbosity 1 example_test.go:48: I0201 17:58:36.236110] main/helper: with prefix example_test.go:50: I0201 17:58:36.236154] key/value pairs int=1 float=2 pair="(1, 2)" raw={Name:joe NS:kube-system} kobj="kube-system/joe" example_test.go:57: I0201 17:58:36.236187] info message level 4 example_test.go:58: I0201 17:58:36.236209] info message level 5 --- PASS: TestKlogr (0.00s) PASS
Configuration menu - View commit details
-
Copy full SHA for 8b4cfd2 - Browse repository at this point
Copy the full SHA 8b4cfd2View commit details -
ktesting: capture log entries only if requested
Most users won't need this feature. It was enabled by default to keep the API simple and because the primary goal was unit testing, but benchmarks also need this and there unnecessary overhead needs to be avoided.
Configuration menu - View commit details
-
Copy full SHA for d113925 - Browse repository at this point
Copy the full SHA d113925View commit details -
buffer: restore dropping of too large buffers
This was removed when introducing sync.Pool in commit 1a1367c because it seemed unnecessary, but an open issue about the sync.Pool documentation shows that a size limit may be useful after all.
Configuration menu - View commit details
-
Copy full SHA for 2582956 - Browse repository at this point
Copy the full SHA 2582956View commit details -
ktesting: allow overriding default formatter
The intended usage is to replace fmt.Sprintf("%+v") with gomega.format.Object + YAML support, therefore the only public API change is in the (still experimental) ktesting. Internally the additional function pointer gets passed through via a new Formatter struct. To minimize the impact on klog and textlogger, the package-level functions still exist and use an empty Formatter.
Configuration menu - View commit details
-
Copy full SHA for 1b27ee8 - Browse repository at this point
Copy the full SHA 1b27ee8View commit details
Commits on Feb 3, 2023
-
Merge pull request #366 from pohly/buffer-size-limit
buffer: restore dropping of too large buffers
Configuration menu - View commit details
-
Copy full SHA for af72dbd - Browse repository at this point
Copy the full SHA af72dbdView commit details -
Merge pull request #365 from pohly/ktesting-timestamps
ktesting improvements
Configuration menu - View commit details
-
Copy full SHA for 90cff0f - Browse repository at this point
Copy the full SHA 90cff0fView commit details
Commits on Feb 9, 2023
-
ktesting: support verbosity changes at runtime
Being able to change the verbosity at runtime is useful. It is already supported by the underlying code, ktesting and its Config struct just didn't expose it.
Configuration menu - View commit details
-
Copy full SHA for e092d89 - Browse repository at this point
Copy the full SHA e092d89View commit details -
textlogger: verbosity changes through public API
By embedding *verbosity.VState in Config, users of the package already had access to V and VModule, but that had two drawbacks: - not easy to discover - unclean separate between internal and external API Providing explicit functions is better.
Configuration menu - View commit details
-
Copy full SHA for a0fea0c - Browse repository at this point
Copy the full SHA a0fea0cView commit details -
Merge pull request #368 from pohly/ktesting-config-api
ktesting + textlogger config api
Configuration menu - View commit details
-
Copy full SHA for e37f9fe - Browse repository at this point
Copy the full SHA e37f9feView commit details
Commits on Mar 1, 2023
-
Merge pull request #363 from pohly/textlogger-backend
textlogger write through
Configuration menu - View commit details
-
Copy full SHA for d7fc505 - Browse repository at this point
Copy the full SHA d7fc505View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v2.90.0...v2.90.1