hclog

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

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 is a zerolog logger that fullfils the `go-hclog` Logger interface.

func New

func New(logger zerolog.Logger) *Logger

New creates a new Raft logger from a zerolog logger.

func (*Logger) Debug

func (l *Logger) Debug(msg string, args ...interface{})

Debug logs a message with a debug level.

func (*Logger) Error

func (l *Logger) Error(msg string, args ...interface{})

Error logs a message with an error level.

func (*Logger) GetLevel

func (l *Logger) GetLevel() hclog.Level

GetLevel returns the current log level for the logger.

func (*Logger) ImpliedArgs

func (l *Logger) ImpliedArgs() []interface{}

ImpliedArgs return key/value pairs associated with the current logger. Not supported at the moment.

func (*Logger) Info

func (l *Logger) Info(msg string, args ...interface{})

Info logs a message with an info level.

func (*Logger) IsDebug

func (l *Logger) IsDebug() bool

IsDebug returns true if the logger should log Debug level messages.

func (*Logger) IsError

func (l *Logger) IsError() bool

IsError returns true if the logger should log Error level messages.

func (*Logger) IsInfo

func (l *Logger) IsInfo() bool

IsInfo returns true if the logger should log Info level messages.

func (*Logger) IsTrace

func (l *Logger) IsTrace() bool

IsTrace returns true if the logger should log Trace level messages.

func (*Logger) IsWarn

func (l *Logger) IsWarn() bool

IsWarn returns true if the logger should log Warn level messages.

func (*Logger) Log

func (l *Logger) Log(level hclog.Level, msg string, args ...interface{})

Log logs a message with the specified level.

func (*Logger) Name

func (l *Logger) Name() string

Name returns the current name for the logger.

func (*Logger) Named

func (l *Logger) Named(name string) hclog.Logger

Named returns a named logger.

func (*Logger) ResetNamed

func (l *Logger) ResetNamed(name string) hclog.Logger

Named returns a named logger.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level hclog.Level)

SetLevel sets the log level for the logger.

func (*Logger) StandardLogger

func (l *Logger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger

StandardLogger returns a value that conforms to the stdlib log.Logger interface

func (*Logger) StandardWriter

func (l *Logger) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer

StandardWriter return a value that conforms to io.Writer, which can be passed into log.SetOutput().

func (*Logger) Trace

func (l *Logger) Trace(msg string, args ...interface{})

Trace logs a message with a trace level.

func (*Logger) Warn

func (l *Logger) Warn(msg string, args ...interface{})

Warn logs a message with a warn level.

func (*Logger) With

func (l *Logger) With(args ...interface{}) hclog.Logger

With returns a logger with the specified fields.

Jump to

Keyboard shortcuts

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