-
Notifications
You must be signed in to change notification settings - Fork 352
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
feat: Set log level of a specific package using logging trait #5183
Conversation
ec5c670
to
4765983
Compare
e2e/common/traits/logging_test.go
Outdated
logTrait, _, _ := unstructured.NestedMap(unstructuredIntegration.Object, "spec", "traits", "logging", "category") | ||
Expect(logTrait).ToNot(BeNil()) | ||
Expect(len(logTrait)).To(Equal(1)) | ||
Expect(logTrait["org.apache.camel.impl"]).To(Equal("DEBUG")) |
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.
This check is more suitable of a unit test, like it already exists. E2E test should check that the configuration is applied correctly, ie, checking Pod's env variables and above all, checking the log traces exposed have that DEBUG level.
As an example, see how we check for content in this test:
camel-k/e2e/common/languages/java_test.go
Line 43 in b86a7fb
Eventually(IntegrationLogs(ns, "java"), TestTimeoutShort).Should(ContainSubstring("Magicstring!")) |
4765983
to
629f0d8
Compare
|
I tried to run as But it fails in the camel-k-operator, the log says Then the integration status keeps changing from This is because the Integration CRD is missing the new |
Also, trying the That's why there is no DEBUG level log messages in the integration log. quarkus logging shorts the log category name, the
The test should monitor for this type of log content. The same for the |
122bbe3
to
85435e9
Compare
Usage:
-t "logging.category.'org.test'=DEBUG"
Release Note