refactor: add prefix to log

This commit is contained in:
fengcaiwen
2025-12-22 11:03:45 +08:00
parent 1fe1e29f72
commit bbd5e121e5
15 changed files with 172 additions and 503 deletions

View File

@@ -91,7 +91,7 @@ type Rule struct {
PortMap map[int32]string
}
func (a *Virtual) To(enableIPv6 bool, logger *log.Logger) (
func (a *Virtual) To(enableIPv6 bool, logger *log.Entry) (
listeners []types.Resource,
clusters []types.Resource,
routes []types.Resource,

View File

@@ -11,7 +11,7 @@ import (
plog "github.com/wencaiwulue/kubevpn/v2/pkg/log"
)
func Main(ctx context.Context, factory cmdutil.Factory, port uint, logger *log.Logger) error {
func Main(ctx context.Context, factory cmdutil.Factory, port uint, logger *log.Entry) error {
snapshotCache := cache.NewSnapshotCache(false, cache.IDHash{}, logger)
proc := NewProcessor(snapshotCache, logger)

View File

@@ -21,13 +21,13 @@ import (
type Processor struct {
cache cache.SnapshotCache
logger *log.Logger
logger *log.Entry
version int64
expireCache *utilcache.Expiring
}
func NewProcessor(cache cache.SnapshotCache, log *log.Logger) *Processor {
func NewProcessor(cache cache.SnapshotCache, log *log.Entry) *Processor {
return &Processor{
cache: cache,
logger: log,