File tree Expand file tree Collapse file tree 8 files changed +36
-1
lines changed
tasks/experimental-features/runtime-sdk Expand file tree Collapse file tree 8 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ func main() {
165
165
InitFlags (pflag .CommandLine )
166
166
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
167
167
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
168
+ // Set log level 2 as default.
169
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
170
+ setupLog .Error (err , "failed to set log level: %v" )
171
+ os .Exit (1 )
172
+ }
168
173
pflag .Parse ()
169
174
170
175
if err := logsv1 .ValidateAndApply (logOptions , nil ); err != nil {
Original file line number Diff line number Diff line change @@ -169,6 +169,11 @@ func main() {
169
169
InitFlags (pflag .CommandLine )
170
170
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
171
171
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
172
+ // Set log level 2 as default.
173
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
174
+ setupLog .Error (err , "failed to set log level: %v" )
175
+ os .Exit (1 )
176
+ }
172
177
pflag .Parse ()
173
178
174
179
if err := logsv1 .ValidateAndApply (logOptions , nil ); err != nil {
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ for log levels; as a small integration on the above guidelines we would like to
117
117
the code; a person reading those logs usually has deep knowledge of the codebase.
118
118
- Don’t use verbosity higher than 5.
119
119
120
- Ideally, in a future release of Cluster API we will switch to use 2 as a default verbosity (currently it is 0) for all the Cluster API
120
+ We are using log level 2 as a default verbosity for all core Cluster API
121
121
controllers as recommended by the Kubernetes guidelines.
122
122
123
123
## Trade-offs
Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ func main() {
95
95
InitFlags (pflag.CommandLine )
96
96
pflag.CommandLine .SetNormalizeFunc (cliflag.WordSepNormalizeFunc )
97
97
pflag.CommandLine .AddGoFlagSet (flag.CommandLine )
98
+ // Set log level 2 as default.
99
+ if err := pflag.CommandLine .Set (" v" , " 2" ); err != nil {
100
+ setupLog.Error (err, " failed to set log level: %v " )
101
+ os.Exit (1 )
102
+ }
98
103
pflag.Parse ()
99
104
100
105
// Validates logs flags using Kubernetes component-base machinery and applies them
Original file line number Diff line number Diff line change @@ -228,6 +228,11 @@ func main() {
228
228
InitFlags (pflag .CommandLine )
229
229
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
230
230
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
231
+ // Set log level 2 as default.
232
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
233
+ setupLog .Error (err , "failed to set log level: %v" )
234
+ os .Exit (1 )
235
+ }
231
236
pflag .Parse ()
232
237
233
238
if err := logsv1 .ValidateAndApply (logOptions , nil ); err != nil {
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ func main() {
106
106
InitFlags (pflag .CommandLine )
107
107
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
108
108
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
109
+ // Set log level 2 as default.
110
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
111
+ setupLog .Error (err , "failed to set log level: %v" )
112
+ os .Exit (1 )
113
+ }
109
114
pflag .Parse ()
110
115
111
116
// Validates logs flags using Kubernetes component-base machinery and apply them
Original file line number Diff line number Diff line change @@ -167,6 +167,11 @@ func main() {
167
167
initFlags (pflag .CommandLine )
168
168
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
169
169
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
170
+ // Set log level 2 as default.
171
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
172
+ setupLog .Error (err , "failed to set log level: %v" )
173
+ os .Exit (1 )
174
+ }
170
175
pflag .Parse ()
171
176
172
177
if err := logsv1 .ValidateAndApply (logOptions , nil ); err != nil {
Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ func main() {
159
159
InitFlags (pflag .CommandLine )
160
160
pflag .CommandLine .SetNormalizeFunc (cliflag .WordSepNormalizeFunc )
161
161
pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
162
+ // Set log level 2 as default.
163
+ if err := pflag .CommandLine .Set ("v" , "2" ); err != nil {
164
+ setupLog .Error (err , "failed to set log level: %v" )
165
+ os .Exit (1 )
166
+ }
162
167
pflag .Parse ()
163
168
164
169
if err := logsv1 .ValidateAndApply (logOptions , nil ); err != nil {
You can’t perform that action at this time.
0 commit comments