-
Notifications
You must be signed in to change notification settings - Fork 285
Support specifying a specific logrus log level for shim log output #1058
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,8 @@ option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/ | |
|
|
||
| // Options are the set of customizations that can be passed at Create time. | ||
| message Options { | ||
| // enable debug tracing | ||
| // Enable debug tracing (sets the logrus log level to debug). This may be deprecated in the future, prefer | ||
| // log_level as this will override debug if both of them are set. | ||
| bool debug = 1; | ||
|
|
||
| enum DebugType { | ||
|
|
@@ -69,23 +70,29 @@ message Options { | |
| // host and UVM. | ||
| bool scale_cpu_limits_to_sandbox = 11; | ||
|
|
||
| // default_container_scratch_size_in_gb is the default scratch size (sandbox.vhdx) | ||
| // default_container_scratch_size_in_gb is the default scratch size (sandbox.vhdx) | ||
| // to be used for containers. Every container will get a sandbox of `size_in_gb` assigned | ||
| // instead of the default of 20GB. | ||
| // instead of the default of 20GB. | ||
| int32 default_container_scratch_size_in_gb = 12; | ||
|
|
||
| // default_vm_scratch_size_in_gb is the default scratch size (sandbox.vhdx) | ||
| // to be used for the UVM. This only applies to WCOW as LCOW doesn't mount a scratch | ||
| // default_vm_scratch_size_in_gb is the default scratch size (sandbox.vhdx) | ||
| // to be used for the UVM. This only applies to WCOW as LCOW doesn't mount a scratch | ||
| // specifically for the UVM. | ||
| int32 default_vm_scratch_size_in_gb = 13; | ||
|
|
||
| // share_scratch specifies if we'd like to reuse scratch space between multiple containers. | ||
| // share_scratch specifies if we'd like to reuse scratch space between multiple containers. | ||
| // This currently only affects LCOW. The sandbox containers scratch space is re-used for all | ||
| // subsequent containers launched in the pod. | ||
| // subsequent containers launched in the pod. | ||
| bool share_scratch = 14; | ||
| //NCProxyAddr is the address of the network configuration proxy service. If omitted | ||
| // the network is setup locally. | ||
| string NCProxyAddr = 15; | ||
|
|
||
| // NCProxyAddr is the address of the network configuration proxy service. If omitted | ||
| // the network is setup locally. | ||
| string NCProxyAddr = 15; | ||
|
|
||
| // log_level specifies the logrus log level for the shim. Supported values are a string representation of the | ||
| // logrus log levels: "trace", "debug", "info", "warn", "error", "fatal", "panic". This setting will override | ||
| // the `debug` field if both are specified, unless the level specified is also "debug", as these are equivalent. | ||
| string log_level = 16; | ||
|
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 know we have code explaining the relationship between log_level and debug, but could we add a comment for log_level also?
Contributor
Author
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. Sure!
Contributor
Author
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. Done |
||
| } | ||
|
|
||
| // ProcessDetails contains additional information about a process. This is the additional | ||
|
|
||
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.
do we want to make an enum for this?
Uh oh!
There was an error while loading. Please reload this page.
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 didn't want to have to supply 0-n for the setting in the containerd config, it seems more intuitive to supply "debug", "warning" etc. as a user then have to remember/figure out what number corresponds to what level. Also makes it so you can feed the string directly to logrus
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.
yeah that's fine