Documentation
¶
Overview ¶
Package main wires log-driver-specific arguments from viper (populated from pflag at startup) into the typed Args structs each driver package consumes.
Why every viper read in this file is GetString — even for fields that are logically int (max-file) or bool (compress):
- The wire to moby is map[string]string. moby's logger.Info.Config is typed map[string]string and each driver's New() parses values itself (units.FromHumanSize for max-size, strconv.Atoi for max-file, strconv.ParseBool for compress). Holding values as strings here means zero conversion and zero round-trip risk on the way out.
- We need to distinguish "unset" from "zero". The per-driver config builders (e.g., getJSONFileConfig) omit unset keys from the moby config map; with GetString, "" == unset and we get that distinction for free. With GetInt/GetBool, viper returns 0 / false for unset, which collide with legal explicit values: max-file=0 is illegal but compress=false is the default, so we cannot tell unset from explicit-false. Tri-state would require *string or sentinel values.
- Validation is the driver's job. moby owns the validators and the runtime guardrails. If we typed the args ourselves, we'd be tempted to validate ourselves and either duplicate moby's rules or quietly diverge from them. Better to keep this layer dumb.
Trade-off: malformed values like "max-file 05" or "compress yes" are forwarded verbatim and fail at writer-construction time inside moby rather than at args-parse time with a friendlier error. All drivers in this binary accept the same trade-off.
Package main denotes the entry of shim loggers for Containerd.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package debug provides utilities for enhanced logging within the shim loggers for containerd, focusing on system journal integration and stack trace capture on signal reception.
|
Package debug provides utilities for enhanced logging within the shim loggers for containerd, focusing on system journal integration and stack trace capture on signal reception. |
|
Package logger provides shim loggers for Containerd.
|
Package logger provides shim loggers for Containerd. |
|
awslogs
Package awslogs provides functionalities for integrating the awslogs logging driver with shim-loggers-for-containerd.
|
Package awslogs provides functionalities for integrating the awslogs logging driver with shim-loggers-for-containerd. |
|
fluentd
Package fluentd provides functionalities for integrating the fluentd logging driver with shim-loggers-for-containerd.
|
Package fluentd provides functionalities for integrating the fluentd logging driver with shim-loggers-for-containerd. |
|
jsonfile
Package jsonfile provides functionalities for integrating the json-file logging driver with shim-loggers-for-containerd.
|
Package jsonfile provides functionalities for integrating the json-file logging driver with shim-loggers-for-containerd. |
|
mocks
Package mock_logger is a generated GoMock package.
|
Package mock_logger is a generated GoMock package. |
|
splunk
Package splunk provides functionalities for integrating the splunk logging driver with shim-loggers-for-containerd.
|
Package splunk provides functionalities for integrating the splunk logging driver with shim-loggers-for-containerd. |