Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Setup klog to log to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
liztio committed Jul 15, 2019
1 parent d8cfeb9 commit 419ec5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/capd-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ limitations under the License.
package main

import (
"fmt"
"flag"
"time"

"k8s.io/client-go/kubernetes"
"k8s.io/klog"
"k8s.io/klog/klogr"
"sigs.k8s.io/cluster-api-provider-docker/actuators"
"sigs.k8s.io/cluster-api-provider-docker/logger"
Expand All @@ -35,6 +36,9 @@ import (
)

func main() {
klog.InitFlags(flag.CommandLine)
flag.Parse()

cfg, err := config.GetConfig()
if err != nil {
panic(err)
Expand Down Expand Up @@ -86,7 +90,8 @@ func main() {
if err := capicluster.AddWithActuator(mgr, &clusterActuator); err != nil {
panic(err)
}
fmt.Println("starting the controller...!")

klogr.New().Info("Starting the controller")

if err := mgr.Start(signals.SetupSignalHandler()); err != nil {
panic(err)
Expand Down
2 changes: 2 additions & 0 deletions objects/control_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func GetStatefulSet(image string) apps.StatefulSet {
Image: image,
Command: []string{
"capd-manager",
"-v=3",
"-logtostderr=true",
},
VolumeMounts: []core.VolumeMount{
{
Expand Down

0 comments on commit 419ec5c

Please sign in to comment.