package server

import (
	cmtlog "git.cw.tr/mukan-network/mukan-consensus/libs/log"

	"cosmossdk.io/log"
)

var _ cmtlog.Logger = (*CometLoggerWrapper)(nil)

// CometLoggerWrapper provides a wrapper around a cosmossdk.io/log instance.
// It implements CometBFT's Logger interface.
type CometLoggerWrapper struct {
	log.Logger
}

// With returns a new wrapped logger with additional context provided by a set
// of key/value tuples. The number of tuples must be even and the key of the
// tuple must be a string.
func (cmt CometLoggerWrapper) With(keyVals ...any) cmtlog.Logger {
	logger := cmt.Logger.With(keyVals...)
	return CometLoggerWrapper{logger}
}
