slog

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package slog contains a Logger type that satisfies cosmossdk.io/log.Logger, backed by a standard library *log/slog.Logger.

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 satisfies log.Logger with logging backed by an instance of *slog.Logger.

func NewCustomLogger

func NewCustomLogger(log *slog.Logger) Logger

NewCustomLogger returns a Logger backed by an existing slog.Logger instance. All logging methods are called directly on the *slog.Logger; therefore it is the caller's responsibility to configure message filtering, level filtering, output format, and so on.

func (Logger) Debug

func (l Logger) Debug(msg string, keyVals ...any)

func (Logger) Error

func (l Logger) Error(msg string, keyVals ...any)

func (Logger) Impl

func (l Logger) Impl() any

Impl returns l's underlying *slog.Logger.

func (Logger) Info

func (l Logger) Info(msg string, keyVals ...any)

func (Logger) Warn

func (l Logger) Warn(msg string, keyVals ...any)

func (Logger) With

func (l Logger) With(keyVals ...any) log.Logger

Jump to

Keyboard shortcuts

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