Skip to content

Commit

Permalink
Merge pull request #281 from cybozu-go/log-version
Browse files Browse the repository at this point in the history
Add version info to the starting logs
  • Loading branch information
chez-shanpu authored Apr 12, 2024
2 parents a8fd180 + 6ba99f8 commit 17888a9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion v2/cmd/coil-controller/sub/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sub

import (
"fmt"
v2 "github.com/cybozu-go/coil/v2"
"net"
"os"
"strconv"
Expand Down Expand Up @@ -136,7 +137,7 @@ func subMain() error {
return err
}

setupLog.Info("starting manager")
setupLog.Info(fmt.Sprintf("starting manager (version: %s)", v2.Version()))
if err := mgr.Start(ctx); err != nil {
setupLog.Error(err, "problem running manager")
return err
Expand Down
4 changes: 3 additions & 1 deletion v2/cmd/coil-egress/sub/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package sub

import (
"errors"
"fmt"
v2 "github.com/cybozu-go/coil/v2"
"net"
"os"
"strings"
Expand Down Expand Up @@ -98,7 +100,7 @@ func subMain() error {
return err
}

setupLog.Info("starting manager")
setupLog.Info(fmt.Sprintf("starting manager (version: %s)", v2.Version()))
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
return err
Expand Down
4 changes: 3 additions & 1 deletion v2/cmd/coil-router/sub/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package sub

import (
"errors"
"fmt"
v2 "github.com/cybozu-go/coil/v2"
"os"
"time"

Expand Down Expand Up @@ -73,7 +75,7 @@ func subMain() error {
return err
}

setupLog.Info("starting manager")
setupLog.Info(fmt.Sprintf("starting manager (version: %s)", v2.Version()))
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
return err
Expand Down
4 changes: 3 additions & 1 deletion v2/cmd/coild/sub/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package sub
import (
"context"
"errors"
"fmt"
v2 "github.com/cybozu-go/coil/v2"
"net"
"os"
"time"
Expand Down Expand Up @@ -138,7 +140,7 @@ func subMain() error {
return err
}

setupLog.Info("starting manager")
setupLog.Info(fmt.Sprintf("starting manager (version: %s)", v2.Version()))
if err := mgr.Start(ctx2); err != nil {
setupLog.Error(err, "problem running manager")
return err
Expand Down

0 comments on commit 17888a9

Please sign in to comment.