mirror of
https://github.com/containerd/containerd.git
synced 2026-08-03 22:50:44 +00:00
Update bootstrap API log level definition
Avoid using logrus concepts in the API, use slog style log levels with integer values and 0 meaning the default "info" level. Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
324
api/next.txtpb
324
api/next.txtpb
@@ -25065,20 +25065,16 @@ file: {
|
||||
enum_type: {
|
||||
name: "LogLevel"
|
||||
value: {
|
||||
name: "LOG_LEVEL_UNSPECIFIED"
|
||||
name: "LOG_LEVEL_INFO"
|
||||
number: 0
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_TRACE"
|
||||
number: 1
|
||||
number: -8
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_DEBUG"
|
||||
number: 2
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_INFO"
|
||||
number: 3
|
||||
number: -4
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_WARN"
|
||||
@@ -25086,11 +25082,15 @@ file: {
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_ERROR"
|
||||
number: 5
|
||||
number: 8
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_FATAL"
|
||||
number: 6
|
||||
number: 10
|
||||
}
|
||||
value: {
|
||||
name: "LOG_LEVEL_PANIC"
|
||||
number: 12
|
||||
}
|
||||
}
|
||||
enum_type: {
|
||||
@@ -25107,7 +25107,7 @@ file: {
|
||||
location: {
|
||||
span: 33
|
||||
span: 0
|
||||
span: 118
|
||||
span: 122
|
||||
span: 1
|
||||
}
|
||||
location: {
|
||||
@@ -25149,7 +25149,7 @@ file: {
|
||||
path: 0
|
||||
span: 42
|
||||
span: 0
|
||||
span: 68
|
||||
span: 71
|
||||
span: 1
|
||||
leading_comments: " BootstrapParams contains all configuration passed from containerd to shim at startup.\n"
|
||||
}
|
||||
@@ -25246,10 +25246,10 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 2
|
||||
span: 50
|
||||
span: 53
|
||||
span: 2
|
||||
span: 25
|
||||
leading_comments: " Requested shim log level.\n"
|
||||
leading_comments: " Requested shim log level.\n INFO = 0, more critical levels are positive, and more verbose\n levels are negative. This is an open enum; shims should treat\n unrecognized values by mapping to the nearest known level.\n"
|
||||
}
|
||||
location: {
|
||||
path: 4
|
||||
@@ -25257,7 +25257,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 6
|
||||
span: 50
|
||||
span: 53
|
||||
span: 2
|
||||
span: 10
|
||||
}
|
||||
@@ -25267,7 +25267,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 1
|
||||
span: 50
|
||||
span: 53
|
||||
span: 11
|
||||
span: 20
|
||||
}
|
||||
@@ -25277,7 +25277,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 3
|
||||
span: 50
|
||||
span: 53
|
||||
span: 23
|
||||
span: 24
|
||||
}
|
||||
@@ -25286,7 +25286,7 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 3
|
||||
span: 53
|
||||
span: 56
|
||||
span: 2
|
||||
span: 32
|
||||
leading_comments: " containerd daemon version that is launching this shim.\n"
|
||||
@@ -25297,7 +25297,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 5
|
||||
span: 53
|
||||
span: 56
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25307,7 +25307,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 1
|
||||
span: 53
|
||||
span: 56
|
||||
span: 9
|
||||
span: 27
|
||||
}
|
||||
@@ -25317,7 +25317,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 3
|
||||
span: 53
|
||||
span: 56
|
||||
span: 30
|
||||
span: 31
|
||||
}
|
||||
@@ -25326,7 +25326,7 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
span: 56
|
||||
span: 59
|
||||
span: 2
|
||||
span: 38
|
||||
leading_comments: " Containerd's TTRPC API address (e.g., \"unix:///run/containerd/containerd.sock.ttrpc\")\n"
|
||||
@@ -25337,7 +25337,7 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 5
|
||||
span: 56
|
||||
span: 59
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25347,7 +25347,7 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 1
|
||||
span: 56
|
||||
span: 59
|
||||
span: 9
|
||||
span: 33
|
||||
}
|
||||
@@ -25357,7 +25357,7 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 3
|
||||
span: 56
|
||||
span: 59
|
||||
span: 36
|
||||
span: 37
|
||||
}
|
||||
@@ -25366,7 +25366,7 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 5
|
||||
span: 59
|
||||
span: 62
|
||||
span: 2
|
||||
span: 37
|
||||
leading_comments: " Containerd's gRPC API address (e.g., \"unix:///run/containerd/containerd.sock\")\n"
|
||||
@@ -25377,7 +25377,7 @@ file: {
|
||||
path: 2
|
||||
path: 5
|
||||
path: 5
|
||||
span: 59
|
||||
span: 62
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25387,7 +25387,7 @@ file: {
|
||||
path: 2
|
||||
path: 5
|
||||
path: 1
|
||||
span: 59
|
||||
span: 62
|
||||
span: 9
|
||||
span: 32
|
||||
}
|
||||
@@ -25397,7 +25397,7 @@ file: {
|
||||
path: 2
|
||||
path: 5
|
||||
path: 3
|
||||
span: 59
|
||||
span: 62
|
||||
span: 35
|
||||
span: 36
|
||||
}
|
||||
@@ -25406,7 +25406,7 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 6
|
||||
span: 62
|
||||
span: 65
|
||||
span: 2
|
||||
span: 31
|
||||
leading_comments: " Path to containerd binary for event publishing\n"
|
||||
@@ -25417,7 +25417,7 @@ file: {
|
||||
path: 2
|
||||
path: 6
|
||||
path: 5
|
||||
span: 62
|
||||
span: 65
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25427,7 +25427,7 @@ file: {
|
||||
path: 2
|
||||
path: 6
|
||||
path: 1
|
||||
span: 62
|
||||
span: 65
|
||||
span: 9
|
||||
span: 26
|
||||
}
|
||||
@@ -25437,7 +25437,7 @@ file: {
|
||||
path: 2
|
||||
path: 6
|
||||
path: 3
|
||||
span: 62
|
||||
span: 65
|
||||
span: 29
|
||||
span: 30
|
||||
}
|
||||
@@ -25446,7 +25446,7 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 7
|
||||
span: 67
|
||||
span: 70
|
||||
span: 2
|
||||
span: 36
|
||||
leading_comments: " Extensible configuration sections for new features\n Each section can contain arbitrary structured data identified by type URL\n Examples: CRI config, NRI config, sandbox config, etc.\n"
|
||||
@@ -25457,7 +25457,7 @@ file: {
|
||||
path: 2
|
||||
path: 7
|
||||
path: 4
|
||||
span: 67
|
||||
span: 70
|
||||
span: 2
|
||||
span: 10
|
||||
}
|
||||
@@ -25467,7 +25467,7 @@ file: {
|
||||
path: 2
|
||||
path: 7
|
||||
path: 6
|
||||
span: 67
|
||||
span: 70
|
||||
span: 11
|
||||
span: 20
|
||||
}
|
||||
@@ -25477,7 +25477,7 @@ file: {
|
||||
path: 2
|
||||
path: 7
|
||||
path: 1
|
||||
span: 67
|
||||
span: 70
|
||||
span: 21
|
||||
span: 31
|
||||
}
|
||||
@@ -25487,16 +25487,16 @@ file: {
|
||||
path: 2
|
||||
path: 7
|
||||
path: 3
|
||||
span: 67
|
||||
span: 70
|
||||
span: 34
|
||||
span: 35
|
||||
}
|
||||
location: {
|
||||
path: 4
|
||||
path: 1
|
||||
span: 72
|
||||
span: 75
|
||||
span: 0
|
||||
span: 79
|
||||
span: 82
|
||||
span: 1
|
||||
leading_comments: " Extension provides extensibility for new configuration types\n without changing the core BootstrapParams protocol\n"
|
||||
}
|
||||
@@ -25504,7 +25504,7 @@ file: {
|
||||
path: 4
|
||||
path: 1
|
||||
path: 1
|
||||
span: 72
|
||||
span: 75
|
||||
span: 8
|
||||
span: 17
|
||||
}
|
||||
@@ -25513,7 +25513,7 @@ file: {
|
||||
path: 1
|
||||
path: 2
|
||||
path: 0
|
||||
span: 78
|
||||
span: 81
|
||||
span: 2
|
||||
span: 32
|
||||
leading_comments: " Configuration data with embedded type URL\n Examples of type URLs:\n - \"containerd.io/cri.v1.PodSandboxConfig\"\n - \"containerd.io/nri.v1.PluginConfig\"\n - \"containerd.io/sandbox.v1.SandboxConfig\"\n"
|
||||
@@ -25524,7 +25524,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 6
|
||||
span: 78
|
||||
span: 81
|
||||
span: 2
|
||||
span: 21
|
||||
}
|
||||
@@ -25534,7 +25534,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 1
|
||||
span: 78
|
||||
span: 81
|
||||
span: 22
|
||||
span: 27
|
||||
}
|
||||
@@ -25544,16 +25544,16 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 3
|
||||
span: 78
|
||||
span: 81
|
||||
span: 30
|
||||
span: 31
|
||||
}
|
||||
location: {
|
||||
path: 4
|
||||
path: 2
|
||||
span: 82
|
||||
span: 85
|
||||
span: 0
|
||||
span: 100
|
||||
span: 103
|
||||
span: 1
|
||||
leading_comments: " BootstrapResult is returned by shim via stdout after successful startup\n"
|
||||
}
|
||||
@@ -25561,7 +25561,7 @@ file: {
|
||||
path: 4
|
||||
path: 2
|
||||
path: 1
|
||||
span: 82
|
||||
span: 85
|
||||
span: 8
|
||||
span: 23
|
||||
}
|
||||
@@ -25570,7 +25570,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 0
|
||||
span: 84
|
||||
span: 87
|
||||
span: 2
|
||||
span: 20
|
||||
leading_comments: " Version of shim parameters (expected 2 for shim v2)\n"
|
||||
@@ -25581,7 +25581,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 5
|
||||
span: 84
|
||||
span: 87
|
||||
span: 2
|
||||
span: 7
|
||||
}
|
||||
@@ -25591,7 +25591,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 1
|
||||
span: 84
|
||||
span: 87
|
||||
span: 8
|
||||
span: 15
|
||||
}
|
||||
@@ -25601,7 +25601,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 3
|
||||
span: 84
|
||||
span: 87
|
||||
span: 18
|
||||
span: 19
|
||||
}
|
||||
@@ -25610,7 +25610,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 1
|
||||
span: 88
|
||||
span: 91
|
||||
span: 2
|
||||
span: 21
|
||||
leading_comments: " Address where shim is listening (e.g., \"unix:///run/containerd/shim.sock\")\n Containerd will connect to this address for task operations\n"
|
||||
@@ -25621,7 +25621,7 @@ file: {
|
||||
path: 2
|
||||
path: 1
|
||||
path: 5
|
||||
span: 88
|
||||
span: 91
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25631,7 +25631,7 @@ file: {
|
||||
path: 2
|
||||
path: 1
|
||||
path: 1
|
||||
span: 88
|
||||
span: 91
|
||||
span: 9
|
||||
span: 16
|
||||
}
|
||||
@@ -25641,7 +25641,7 @@ file: {
|
||||
path: 2
|
||||
path: 1
|
||||
path: 3
|
||||
span: 88
|
||||
span: 91
|
||||
span: 19
|
||||
span: 20
|
||||
}
|
||||
@@ -25650,7 +25650,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 2
|
||||
span: 91
|
||||
span: 94
|
||||
span: 2
|
||||
span: 22
|
||||
leading_comments: " Protocol used by shim: \"ttrpc\" or \"grpc\"\n"
|
||||
@@ -25661,7 +25661,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 5
|
||||
span: 91
|
||||
span: 94
|
||||
span: 2
|
||||
span: 8
|
||||
}
|
||||
@@ -25671,7 +25671,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 1
|
||||
span: 91
|
||||
span: 94
|
||||
span: 9
|
||||
span: 17
|
||||
}
|
||||
@@ -25681,7 +25681,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 3
|
||||
span: 91
|
||||
span: 94
|
||||
span: 20
|
||||
span: 21
|
||||
}
|
||||
@@ -25690,7 +25690,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 3
|
||||
span: 96
|
||||
span: 99
|
||||
span: 2
|
||||
span: 39
|
||||
leading_comments: " Optional: Capabilities supported by this shim instance.\n Reserved for future use to allow optional capability negotiation\n between the daemon and shim.\n"
|
||||
@@ -25701,7 +25701,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 4
|
||||
span: 96
|
||||
span: 99
|
||||
span: 2
|
||||
span: 10
|
||||
}
|
||||
@@ -25711,7 +25711,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 6
|
||||
span: 96
|
||||
span: 99
|
||||
span: 11
|
||||
span: 21
|
||||
}
|
||||
@@ -25721,7 +25721,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 1
|
||||
span: 96
|
||||
span: 99
|
||||
span: 22
|
||||
span: 34
|
||||
}
|
||||
@@ -25731,7 +25731,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 3
|
||||
span: 96
|
||||
span: 99
|
||||
span: 37
|
||||
span: 38
|
||||
}
|
||||
@@ -25740,7 +25740,7 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 4
|
||||
span: 99
|
||||
span: 102
|
||||
span: 2
|
||||
span: 35
|
||||
leading_comments: " Optional: Additional metadata from shim\n"
|
||||
@@ -25751,7 +25751,7 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 6
|
||||
span: 99
|
||||
span: 102
|
||||
span: 2
|
||||
span: 21
|
||||
}
|
||||
@@ -25761,7 +25761,7 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 1
|
||||
span: 99
|
||||
span: 102
|
||||
span: 22
|
||||
span: 30
|
||||
}
|
||||
@@ -25771,24 +25771,24 @@ file: {
|
||||
path: 2
|
||||
path: 4
|
||||
path: 3
|
||||
span: 99
|
||||
span: 102
|
||||
span: 33
|
||||
span: 34
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
span: 104
|
||||
span: 108
|
||||
span: 0
|
||||
span: 112
|
||||
span: 116
|
||||
span: 1
|
||||
leading_comments: " LogLevel defines log verbosity levels independent of any specific\n logging library.\n"
|
||||
leading_comments: " LogLevel defines log verbosity. INFO = 0, more critical levels are\n positive, and more verbose levels are negative. This is an open enum;\n unknown numeric values are preserved on the wire.\n"
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 1
|
||||
span: 104
|
||||
span: 108
|
||||
span: 5
|
||||
span: 13
|
||||
}
|
||||
@@ -25797,9 +25797,9 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 0
|
||||
span: 105
|
||||
span: 109
|
||||
span: 2
|
||||
span: 28
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
@@ -25807,36 +25807,36 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 1
|
||||
span: 105
|
||||
span: 109
|
||||
span: 2
|
||||
span: 16
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 0
|
||||
path: 2
|
||||
span: 109
|
||||
span: 20
|
||||
span: 21
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 1
|
||||
span: 110
|
||||
span: 2
|
||||
span: 23
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 0
|
||||
path: 2
|
||||
span: 105
|
||||
span: 26
|
||||
span: 27
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 1
|
||||
span: 106
|
||||
span: 2
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 1
|
||||
path: 1
|
||||
span: 106
|
||||
span: 110
|
||||
span: 2
|
||||
span: 17
|
||||
}
|
||||
@@ -25846,26 +25846,26 @@ file: {
|
||||
path: 2
|
||||
path: 1
|
||||
path: 2
|
||||
span: 106
|
||||
span: 110
|
||||
span: 20
|
||||
span: 21
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 2
|
||||
span: 107
|
||||
span: 2
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 2
|
||||
span: 111
|
||||
span: 2
|
||||
span: 23
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 2
|
||||
path: 1
|
||||
span: 107
|
||||
span: 111
|
||||
span: 2
|
||||
span: 17
|
||||
}
|
||||
@@ -25875,18 +25875,18 @@ file: {
|
||||
path: 2
|
||||
path: 2
|
||||
path: 2
|
||||
span: 107
|
||||
span: 111
|
||||
span: 20
|
||||
span: 21
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 3
|
||||
span: 108
|
||||
span: 112
|
||||
span: 2
|
||||
span: 21
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
@@ -25894,7 +25894,7 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 1
|
||||
span: 108
|
||||
span: 112
|
||||
span: 2
|
||||
span: 16
|
||||
}
|
||||
@@ -25904,17 +25904,8 @@ file: {
|
||||
path: 2
|
||||
path: 3
|
||||
path: 2
|
||||
span: 108
|
||||
span: 19
|
||||
span: 112
|
||||
span: 20
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
span: 109
|
||||
span: 2
|
||||
span: 21
|
||||
}
|
||||
location: {
|
||||
@@ -25922,37 +25913,46 @@ file: {
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
path: 1
|
||||
span: 109
|
||||
span: 2
|
||||
span: 16
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
path: 2
|
||||
span: 109
|
||||
span: 19
|
||||
span: 20
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 5
|
||||
span: 110
|
||||
span: 113
|
||||
span: 2
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
path: 1
|
||||
span: 113
|
||||
span: 2
|
||||
span: 17
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 4
|
||||
path: 2
|
||||
span: 113
|
||||
span: 20
|
||||
span: 21
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 5
|
||||
span: 114
|
||||
span: 2
|
||||
span: 23
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 5
|
||||
path: 1
|
||||
span: 110
|
||||
span: 114
|
||||
span: 2
|
||||
span: 17
|
||||
}
|
||||
@@ -25962,26 +25962,26 @@ file: {
|
||||
path: 2
|
||||
path: 5
|
||||
path: 2
|
||||
span: 110
|
||||
span: 114
|
||||
span: 20
|
||||
span: 21
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 6
|
||||
span: 111
|
||||
span: 2
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 6
|
||||
span: 115
|
||||
span: 2
|
||||
span: 23
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 0
|
||||
path: 2
|
||||
path: 6
|
||||
path: 1
|
||||
span: 111
|
||||
span: 115
|
||||
span: 2
|
||||
span: 17
|
||||
}
|
||||
@@ -25991,16 +25991,16 @@ file: {
|
||||
path: 2
|
||||
path: 6
|
||||
path: 2
|
||||
span: 111
|
||||
span: 115
|
||||
span: 20
|
||||
span: 21
|
||||
span: 22
|
||||
}
|
||||
location: {
|
||||
path: 5
|
||||
path: 1
|
||||
span: 116
|
||||
span: 120
|
||||
span: 0
|
||||
span: 118
|
||||
span: 122
|
||||
span: 1
|
||||
leading_comments: " Capability defines optional features that can be negotiated between\n containerd and shims.\n"
|
||||
}
|
||||
@@ -26008,7 +26008,7 @@ file: {
|
||||
path: 5
|
||||
path: 1
|
||||
path: 1
|
||||
span: 116
|
||||
span: 120
|
||||
span: 5
|
||||
span: 15
|
||||
}
|
||||
@@ -26017,7 +26017,7 @@ file: {
|
||||
path: 1
|
||||
path: 2
|
||||
path: 0
|
||||
span: 117
|
||||
span: 121
|
||||
span: 2
|
||||
span: 29
|
||||
}
|
||||
@@ -26027,7 +26027,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 1
|
||||
span: 117
|
||||
span: 121
|
||||
span: 2
|
||||
span: 24
|
||||
}
|
||||
@@ -26037,7 +26037,7 @@ file: {
|
||||
path: 2
|
||||
path: 0
|
||||
path: 2
|
||||
span: 117
|
||||
span: 121
|
||||
span: 27
|
||||
span: 28
|
||||
}
|
||||
|
||||
@@ -53,39 +53,40 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// LogLevel defines log verbosity levels independent of any specific
|
||||
// logging library.
|
||||
// LogLevel defines log verbosity. INFO = 0, more critical levels are
|
||||
// positive, and more verbose levels are negative. This is an open enum;
|
||||
// unknown numeric values are preserved on the wire.
|
||||
type LogLevel int32
|
||||
|
||||
const (
|
||||
LogLevel_LOG_LEVEL_UNSPECIFIED LogLevel = 0
|
||||
LogLevel_LOG_LEVEL_TRACE LogLevel = 1
|
||||
LogLevel_LOG_LEVEL_DEBUG LogLevel = 2
|
||||
LogLevel_LOG_LEVEL_INFO LogLevel = 3
|
||||
LogLevel_LOG_LEVEL_WARN LogLevel = 4
|
||||
LogLevel_LOG_LEVEL_ERROR LogLevel = 5
|
||||
LogLevel_LOG_LEVEL_FATAL LogLevel = 6
|
||||
LogLevel_LOG_LEVEL_INFO LogLevel = 0
|
||||
LogLevel_LOG_LEVEL_TRACE LogLevel = -8
|
||||
LogLevel_LOG_LEVEL_DEBUG LogLevel = -4
|
||||
LogLevel_LOG_LEVEL_WARN LogLevel = 4
|
||||
LogLevel_LOG_LEVEL_ERROR LogLevel = 8
|
||||
LogLevel_LOG_LEVEL_FATAL LogLevel = 10
|
||||
LogLevel_LOG_LEVEL_PANIC LogLevel = 12
|
||||
)
|
||||
|
||||
// Enum value maps for LogLevel.
|
||||
var (
|
||||
LogLevel_name = map[int32]string{
|
||||
0: "LOG_LEVEL_UNSPECIFIED",
|
||||
1: "LOG_LEVEL_TRACE",
|
||||
2: "LOG_LEVEL_DEBUG",
|
||||
3: "LOG_LEVEL_INFO",
|
||||
4: "LOG_LEVEL_WARN",
|
||||
5: "LOG_LEVEL_ERROR",
|
||||
6: "LOG_LEVEL_FATAL",
|
||||
0: "LOG_LEVEL_INFO",
|
||||
-8: "LOG_LEVEL_TRACE",
|
||||
-4: "LOG_LEVEL_DEBUG",
|
||||
4: "LOG_LEVEL_WARN",
|
||||
8: "LOG_LEVEL_ERROR",
|
||||
10: "LOG_LEVEL_FATAL",
|
||||
12: "LOG_LEVEL_PANIC",
|
||||
}
|
||||
LogLevel_value = map[string]int32{
|
||||
"LOG_LEVEL_UNSPECIFIED": 0,
|
||||
"LOG_LEVEL_TRACE": 1,
|
||||
"LOG_LEVEL_DEBUG": 2,
|
||||
"LOG_LEVEL_INFO": 3,
|
||||
"LOG_LEVEL_WARN": 4,
|
||||
"LOG_LEVEL_ERROR": 5,
|
||||
"LOG_LEVEL_FATAL": 6,
|
||||
"LOG_LEVEL_INFO": 0,
|
||||
"LOG_LEVEL_TRACE": -8,
|
||||
"LOG_LEVEL_DEBUG": -4,
|
||||
"LOG_LEVEL_WARN": 4,
|
||||
"LOG_LEVEL_ERROR": 8,
|
||||
"LOG_LEVEL_FATAL": 10,
|
||||
"LOG_LEVEL_PANIC": 12,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -172,6 +173,9 @@ type BootstrapParams struct {
|
||||
// Namespace for the container
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// Requested shim log level.
|
||||
// INFO = 0, more critical levels are positive, and more verbose
|
||||
// levels are negative. This is an open enum; shims should treat
|
||||
// unrecognized values by mapping to the nearest known level.
|
||||
LogLevel LogLevel `protobuf:"varint,3,opt,name=log_level,json=logLevel,proto3,enum=containerd.runtime.bootstrap.v1.LogLevel" json:"log_level,omitempty"`
|
||||
// containerd daemon version that is launching this shim.
|
||||
ContainerdVersion string `protobuf:"bytes,4,opt,name=containerd_version,json=containerdVersion,proto3" json:"containerd_version,omitempty"`
|
||||
@@ -237,7 +241,7 @@ func (x *BootstrapParams) GetLogLevel() LogLevel {
|
||||
if x != nil {
|
||||
return x.LogLevel
|
||||
}
|
||||
return LogLevel_LOG_LEVEL_UNSPECIFIED
|
||||
return LogLevel_LOG_LEVEL_INFO
|
||||
}
|
||||
|
||||
func (x *BootstrapParams) GetContainerdVersion() string {
|
||||
@@ -477,25 +481,26 @@ var file_runtime_bootstrap_v1_bootstrap_proto_rawDesc = []byte{
|
||||
0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0xa1,
|
||||
0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x15, 0x4c,
|
||||
0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
|
||||
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45,
|
||||
0x56, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4c,
|
||||
0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x02,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e,
|
||||
0x46, 0x4f, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45,
|
||||
0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f,
|
||||
0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x46, 0x41, 0x54, 0x41, 0x4c,
|
||||
0x10, 0x06, 0x2a, 0x28, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
|
||||
0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x42, 0x45, 0x5a, 0x43,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x62, 0x6f, 0x6f,
|
||||
0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74,
|
||||
0x72, 0x61, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0xad,
|
||||
0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c,
|
||||
0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12,
|
||||
0x1c, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41,
|
||||
0x43, 0x45, 0x10, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x1c, 0x0a,
|
||||
0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47,
|
||||
0x10, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c,
|
||||
0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x04, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52,
|
||||
0x4f, 0x52, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45,
|
||||
0x4c, 0x5f, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47,
|
||||
0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x50, 0x41, 0x4e, 0x49, 0x43, 0x10, 0x0c, 0x2a, 0x28,
|
||||
0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16,
|
||||
0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
|
||||
0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72,
|
||||
0x61, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -48,6 +48,9 @@ message BootstrapParams {
|
||||
string namespace = 2;
|
||||
|
||||
// Requested shim log level.
|
||||
// INFO = 0, more critical levels are positive, and more verbose
|
||||
// levels are negative. This is an open enum; shims should treat
|
||||
// unrecognized values by mapping to the nearest known level.
|
||||
LogLevel log_level = 3;
|
||||
|
||||
// containerd daemon version that is launching this shim.
|
||||
@@ -100,16 +103,17 @@ message BootstrapResult {
|
||||
map<string, string> metadata = 5;
|
||||
}
|
||||
|
||||
// LogLevel defines log verbosity levels independent of any specific
|
||||
// logging library.
|
||||
// LogLevel defines log verbosity. INFO = 0, more critical levels are
|
||||
// positive, and more verbose levels are negative. This is an open enum;
|
||||
// unknown numeric values are preserved on the wire.
|
||||
enum LogLevel {
|
||||
LOG_LEVEL_UNSPECIFIED = 0;
|
||||
LOG_LEVEL_TRACE = 1;
|
||||
LOG_LEVEL_DEBUG = 2;
|
||||
LOG_LEVEL_INFO = 3;
|
||||
LOG_LEVEL_WARN = 4;
|
||||
LOG_LEVEL_ERROR = 5;
|
||||
LOG_LEVEL_FATAL = 6;
|
||||
LOG_LEVEL_INFO = 0;
|
||||
LOG_LEVEL_TRACE = -8;
|
||||
LOG_LEVEL_DEBUG = -4;
|
||||
LOG_LEVEL_WARN = 4;
|
||||
LOG_LEVEL_ERROR = 8;
|
||||
LOG_LEVEL_FATAL = 10;
|
||||
LOG_LEVEL_PANIC = 12;
|
||||
}
|
||||
|
||||
// Capability defines optional features that can be negotiated between
|
||||
|
||||
@@ -18,14 +18,15 @@ package bootstrap
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
)
|
||||
|
||||
// LogLevelFromLogrus converts a logrus log level string (e.g. "debug", "info")
|
||||
// to a LogLevel enum value. Returns LOG_LEVEL_UNSPECIFIED for unrecognized strings.
|
||||
func LogLevelFromLogrus(s string) LogLevel {
|
||||
// LogLevelFromString converts a log level string (e.g. "debug", "info") to a
|
||||
// LogLevel enum value. The accepted strings are compatible with logrus level names.
|
||||
func LogLevelFromString(s string) LogLevel {
|
||||
switch s {
|
||||
case "trace":
|
||||
return LogLevel_LOG_LEVEL_TRACE
|
||||
@@ -39,8 +40,13 @@ func LogLevelFromLogrus(s string) LogLevel {
|
||||
return LogLevel_LOG_LEVEL_ERROR
|
||||
case "fatal":
|
||||
return LogLevel_LOG_LEVEL_FATAL
|
||||
case "panic":
|
||||
return LogLevel_LOG_LEVEL_PANIC
|
||||
default:
|
||||
return LogLevel_LOG_LEVEL_UNSPECIFIED
|
||||
if v, err := strconv.ParseInt(s, 10, 32); err == nil {
|
||||
return LogLevel(v)
|
||||
}
|
||||
return LogLevel_LOG_LEVEL_INFO
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user