zap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(logger *zap.Logger) hclog.Logger

Wrap accepts a zap Logger and wraps it to adapt to a hclog.Logger.

A nil logger will cause a panic.

Types

type Wrapper

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

Wrapper is a type that wraps a zap Logger and adapts it to a hclog.Logger

func (Wrapper) Debug

func (w Wrapper) Debug(msg string, args ...any)

func (Wrapper) Error

func (w Wrapper) Error(msg string, args ...any)

func (Wrapper) GetLevel added in v0.2.0

func (w Wrapper) GetLevel() hclog.Level

func (Wrapper) ImpliedArgs

func (w Wrapper) ImpliedArgs() []any

func (Wrapper) Info

func (w Wrapper) Info(msg string, args ...any)

func (Wrapper) IsDebug

func (w Wrapper) IsDebug() bool

func (Wrapper) IsError

func (w Wrapper) IsError() bool

func (Wrapper) IsInfo

func (w Wrapper) IsInfo() bool

func (Wrapper) IsTrace

func (w Wrapper) IsTrace() bool

func (Wrapper) IsWarn

func (w Wrapper) IsWarn() bool

func (Wrapper) Log

func (w Wrapper) Log(level hclog.Level, msg string, args ...any)

func (Wrapper) Name

func (w Wrapper) Name() string

func (Wrapper) Named

func (w Wrapper) Named(name string) hclog.Logger

func (Wrapper) ResetNamed

func (w Wrapper) ResetNamed(name string) hclog.Logger

func (Wrapper) SetLevel

func (w Wrapper) SetLevel(level hclog.Level)

func (Wrapper) StandardLogger

func (w Wrapper) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger

func (Wrapper) StandardWriter

func (w Wrapper) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer

func (Wrapper) Trace

func (w Wrapper) Trace(msg string, args ...any)

func (Wrapper) Warn

func (w Wrapper) Warn(msg string, args ...any)

func (Wrapper) With

func (w Wrapper) With(args ...any) hclog.Logger

Jump to

Keyboard shortcuts

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