log

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SdkLogWrapper

type SdkLogWrapper struct {
	*zerolog.Logger
}

SdkLogWrapper provides a wrapper around a zerolog.Logger instance. It implements cosmos sdk's Logger interface.

func (SdkLogWrapper) Debug

func (z SdkLogWrapper) Debug(msg string, keyVals ...any)

Debug implements cosmos sdk's Logger interface and logs with level DEBUG. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.

func (SdkLogWrapper) Error

func (z SdkLogWrapper) Error(msg string, keyVals ...any)

Error implements cosmos sdk's Logger interface and logs with level ERR. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.

func (SdkLogWrapper) Impl

func (z SdkLogWrapper) Impl() any

Impl returns the underlying logger implementation. It is used to access the full functionalities of the underlying logger. Advanced users can type cast the returned value to the actual logger.

func (SdkLogWrapper) Info

func (z SdkLogWrapper) Info(msg string, keyVals ...any)

Info implements cosmos sdk's Logger interface and logs with level INFO. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.

func (SdkLogWrapper) Warn

func (z SdkLogWrapper) Warn(msg string, keyVals ...any)

Warn implements cosmos sdk's Logger interface and logs with level WARN. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.

func (SdkLogWrapper) With

func (z SdkLogWrapper) With(keyVals ...interface{}) sdklog.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.

Jump to

Keyboard shortcuts

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