Documentation ¶
Index ¶
- Constants
- func InitLogger(conf zap.Config, serverAddr string) error
- func InitLoggerWithOpt(conf zap.Config, opts *LogOptions) error
- func Sync()
- type ChainLogger
- func CtxDebug(ctx CtxProvider, msg string) *ChainLogger
- func CtxError(ctx CtxProvider, msg string) *ChainLogger
- func CtxInfo(ctx CtxProvider, msg string) *ChainLogger
- func CtxWarn(ctx CtxProvider, msg string) *ChainLogger
- func Debug(msg string) *ChainLogger
- func Error(msg string) *ChainLogger
- func Info(msg string) *ChainLogger
- func Warn(msg string) *ChainLogger
- type CtxProvider
- type LogOptions
Constants ¶
View Source
const (
IDKey string = "centralog_id"
)
Variables ¶
This section is empty.
Functions ¶
func InitLoggerWithOpt ¶
func InitLoggerWithOpt(conf zap.Config, opts *LogOptions) error
Types ¶
type ChainLogger ¶
type ChainLogger struct {
// contains filtered or unexported fields
}
func CtxDebug ¶ added in v1.1.1
func CtxDebug(ctx CtxProvider, msg string) *ChainLogger
func CtxError ¶ added in v1.1.1
func CtxError(ctx CtxProvider, msg string) *ChainLogger
func CtxInfo ¶ added in v1.1.1
func CtxInfo(ctx CtxProvider, msg string) *ChainLogger
func CtxWarn ¶ added in v1.1.1
func CtxWarn(ctx CtxProvider, msg string) *ChainLogger
func Debug ¶
func Debug(msg string) *ChainLogger
func Error ¶
func Error(msg string) *ChainLogger
func Info ¶
func Info(msg string) *ChainLogger
func Warn ¶
func Warn(msg string) *ChainLogger
func (*ChainLogger) Any ¶
func (cl *ChainLogger) Any(key string, val interface{}) *ChainLogger
func (*ChainLogger) CtxID ¶
func (cl *ChainLogger) CtxID(ctx context.Context) *ChainLogger
func (*ChainLogger) Log ¶
func (cl *ChainLogger) Log()
type CtxProvider ¶ added in v1.1.1
type LogOptions ¶
Click to show internal directories.
Click to hide internal directories.