Skip to content

Commit

Permalink
Log version when starting management and signal (netbirdio#1649)
Browse files Browse the repository at this point in the history
Output log version at service startup
  • Loading branch information
mlsmaycon authored Feb 29, 2024
1 parent 069445e commit a66a5b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions management/cmd/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"github.com/netbirdio/netbird/management/server/metrics"
"github.com/netbirdio/netbird/management/server/telemetry"
"github.com/netbirdio/netbird/util"
"github.com/netbirdio/netbird/version"
)

// ManagementLegacyPort is the port that was used before by the Management gRPC server.
Expand Down Expand Up @@ -315,6 +316,7 @@ var (
}
}

log.Infof("management server version %s", version.NetbirdVersion())
log.Infof("running HTTP server and gRPC server on the same port: %s", listener.Addr().String())
serveGRPCWithHTTP(listener, rootHandler, tlsEnabled)

Expand Down
6 changes: 5 additions & 1 deletion signal/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"flag"
"fmt"
"golang.org/x/crypto/acme/autocert"
"io"
"io/fs"
"net"
Expand All @@ -14,10 +13,14 @@ import (
"strings"
"time"

"golang.org/x/crypto/acme/autocert"

"github.com/netbirdio/netbird/encryption"
"github.com/netbirdio/netbird/signal/proto"
"github.com/netbirdio/netbird/signal/server"
"github.com/netbirdio/netbird/util"
"github.com/netbirdio/netbird/version"

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"google.golang.org/grpc"
Expand Down Expand Up @@ -129,6 +132,7 @@ var (
log.Infof("running gRPC server: %s", grpcListener.Addr().String())
}

log.Infof("signal server version %s", version.NetbirdVersion())
log.Infof("started Signal Service")

SetupCloseHandler()
Expand Down

0 comments on commit a66a5b6

Please sign in to comment.