logger: otlp support

This commit is contained in:
2024-11-09 12:20:09 +00:00
parent ab94adb925
commit 152be9d956
6 changed files with 352 additions and 156 deletions

View File

@@ -2,13 +2,13 @@ package version
import (
"fmt"
"log/slog"
"runtime"
"runtime/debug"
"strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cobra"
"go.ntppool.org/common/logger"
"golang.org/x/mod/semver"
)
@@ -39,7 +39,7 @@ func init() {
VERSION = "v" + VERSION
}
if !semver.IsValid(VERSION) {
logger.Setup().Warn("invalid version number", "version", VERSION)
slog.Default().Warn("invalid version number", "version", VERSION)
}
}
if bi, ok := debug.ReadBuildInfo(); ok {