@@ -87,14 +87,15 @@ func init() {
87
87
// Use V(5) for GCE Cloud Provider Call informational logging
88
88
// Use V(6) for extra repeated/polling information
89
89
enumFlag (& computeEnvironment , "compute-environment" , allowedComputeEnvironment , "Operating compute environment" )
90
- urlFlag (computeEndpoint , "compute-endpoint" , "Compute endpoint" )
90
+ urlFlag (& computeEndpoint , "compute-endpoint" , "Compute endpoint" )
91
91
klog .InitFlags (flag .CommandLine )
92
92
flag .Set ("logtostderr" , "true" )
93
93
}
94
94
95
95
func main () {
96
96
flag .Parse ()
97
97
rand .Seed (time .Now ().UnixNano ())
98
+ klog .Infof ("Operating compute environment set to: %s and computeEndpoint is set to: %v" , computeEnvironment , computeEndpoint )
98
99
handle ()
99
100
os .Exit (0 )
100
101
}
@@ -207,13 +208,14 @@ func enumFlag(target *gce.Environment, name string, allowedComputeEnvironment []
207
208
208
209
}
209
210
210
- func urlFlag (target * url.URL , name string , usage string ) {
211
+ func urlFlag (target * * url.URL , name string , usage string ) {
211
212
flag .Func (name , usage , func (flagValue string ) error {
212
213
computeURL , err := url .ParseRequestURI (flagValue )
213
214
if err == nil {
214
- target = computeURL
215
+ * target = computeURL
215
216
return nil
216
217
}
218
+ klog .Infof ("Error parsing endpoint compute endpoint %v" , err )
217
219
return err
218
220
})
219
221
}
0 commit comments