fix: configure logger before trying to log (#1128)
Log about GitHub client not being initialized is not seen as logger is configured after adding the log
This commit is contained in:
parent
a9aea0bd9c
commit
9079c5d85f
|
|
@ -144,6 +144,8 @@ func main() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ctrl.SetLogger(logger)
|
||||||
|
|
||||||
// In order to support runner groups with custom visibility (selected repositories), we need to perform some GitHub API calls.
|
// In order to support runner groups with custom visibility (selected repositories), we need to perform some GitHub API calls.
|
||||||
// Let the user define if they want to opt-in supporting this option by providing the proper GitHub authentication parameters
|
// Let the user define if they want to opt-in supporting this option by providing the proper GitHub authentication parameters
|
||||||
// Without an opt-in, runner groups with custom visibility won't be supported to save API calls
|
// Without an opt-in, runner groups with custom visibility won't be supported to save API calls
|
||||||
|
|
@ -160,8 +162,6 @@ func main() {
|
||||||
setupLog.Info("GitHub client is not initialized. Runner groups with custom visibility are not supported. If needed, please provide GitHub authentication. This will incur in extra GitHub API calls")
|
setupLog.Info("GitHub client is not initialized. Runner groups with custom visibility are not supported. If needed, please provide GitHub authentication. This will incur in extra GitHub API calls")
|
||||||
}
|
}
|
||||||
|
|
||||||
ctrl.SetLogger(logger)
|
|
||||||
|
|
||||||
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
|
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
|
||||||
Scheme: scheme,
|
Scheme: scheme,
|
||||||
SyncPeriod: &syncPeriod,
|
SyncPeriod: &syncPeriod,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue