kphuslog

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: BSD-3-Clause Imports: 2 Imported by: 1

README

kphuslog

kphuslog is a plug-in package to hook phuslu/log into a kgo.Logger

To use,

cl, err := kgo.NewClient(
        kgo.WithLogger(kphuslog.New(logger)),
        // ...other opts
)

Documentation

Overview

Package kphuslog provides a plug-in kgo.Logger wrapping zerolog.Logger for usage in a kgo.Client.

This can be used like so:

cl, err := kgo.NewClient(
        kgo.WithLogger(kphuslog.New(logger)),
        // ...other opts
)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger provides the kgo.Logger interface for usage in kgo.WithLogger when initializing a client.

func New

func New(pl *log.Logger) *Logger

New returns a new logger.

func (*Logger) Level

func (l *Logger) Level() kgo.LogLevel

Level is for the kgo.Logger interface.

func (*Logger) Log

func (l *Logger) Log(level kgo.LogLevel, msg string, keyvals ...interface{})

Log is for the kgo.Logger interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL