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
Update log level to run tests on debug level #5071
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../test/config/config-logging.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Copyright 2019 The Knative Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-logging | ||
namespace: knative-serving | ||
labels: | ||
serving.knative.dev/release: devel | ||
|
||
data: | ||
_example: | | ||
################################ | ||
# # | ||
# EXAMPLE CONFIGURATION # | ||
# # | ||
################################ | ||
|
||
# This block is not actually functional configuration, | ||
# but serves to illustrate the available configuration | ||
# options and document them in a way that is accessible | ||
# to users that `kubectl edit` this config map. | ||
# | ||
# These sample configuration options may be copied out of | ||
# this example block and unindented to be in the data block | ||
# to actually change the configuration. | ||
|
||
# Common configuration for all Knative codebase | ||
zap-logger-config: | | ||
{ | ||
"level": "info", | ||
"development": false, | ||
"outputPaths": ["stdout"], | ||
"errorOutputPaths": ["stderr"], | ||
"encoding": "json", | ||
"encoderConfig": { | ||
"timeKey": "ts", | ||
"levelKey": "level", | ||
"nameKey": "logger", | ||
"callerKey": "caller", | ||
"messageKey": "msg", | ||
"stacktraceKey": "stacktrace", | ||
"lineEnding": "", | ||
"levelEncoder": "", | ||
"timeEncoder": "iso8601", | ||
"durationEncoder": "", | ||
"callerEncoder": "" | ||
} | ||
} | ||
|
||
# Log level overrides | ||
# For all components except the autoscaler and queue proxy, | ||
# changes are be picked up immediately. | ||
# For autoscaler and queue proxy, changes require recreation of the pods. | ||
loglevel.controller: "info" | ||
loglevel.autoscaler: "info" | ||
loglevel.queueproxy: "info" | ||
loglevel.webhook: "info" | ||
loglevel.activator: "info" | ||
|
||
zap-logger-config: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can leave this out entirely to pick up the default? Not entirely sure though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just tried applying this yaml without this block and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
cc @andrew-su There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thought was that we'd only need the specific loglevels below and that the broader loggingconfig would be defaulted in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If both are kubectl applied, then applying this without it will strip it in the three way merge. |
||
{ | ||
"level": "debug", | ||
"development": false, | ||
"outputPaths": ["stdout"], | ||
"errorOutputPaths": ["stderr"], | ||
"encoding": "json", | ||
"encoderConfig": { | ||
"timeKey": "ts", | ||
"levelKey": "level", | ||
"nameKey": "logger", | ||
"callerKey": "caller", | ||
"messageKey": "msg", | ||
"stacktraceKey": "stacktrace", | ||
"lineEnding": "", | ||
"levelEncoder": "", | ||
"timeEncoder": "iso8601", | ||
"durationEncoder": "", | ||
"callerEncoder": "" | ||
} | ||
} | ||
|
||
# Log level overrides | ||
# For all components except the autoscaler and queue proxy, | ||
# changes are be picked up immediately. | ||
# For autoscaler and queue proxy, changes require recreation of the pods. | ||
loglevel.controller: "debug" | ||
loglevel.autoscaler: "debug" | ||
loglevel.queueproxy: "debug" | ||
loglevel.webhook: "debug" | ||
loglevel.activator: "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.
So for the main file, we symlink it under
testdata
and validate it's content in a Go test. Can we do the same here to validate changes? Otherwise this looks good to meThere 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.
@mattmoor Sounds good. Should it be a new test under
test/
? Which package should it belong?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.
I'd just put it right next to where we test the real config (same test, second symlink)
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.
@mattmoor sounds good! Just added the test and symlink