pluginutils

package
v5.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZapWrap

func ZapWrap(zap *zap.Logger) hclog.Logger

ZapWrap simplifies wrapping zap instance to hclog.Logger interfacs.

Types

type Level

type Level = hclog.Level

type PluginConfig added in v5.3.5

type PluginConfig struct {
	Name string
	Port int
}

func LoadPluginConfig added in v5.3.5

func LoadPluginConfig() ([]PluginConfig, error)

LoadPluginConfig Loads the plugin list from the TOML config file

type ZapWrapper

type ZapWrapper struct {
	Zap *zap.Logger
	// contains filtered or unexported fields
}

ZapWrapper holds *zap.Logger and adapts its methods to declared by hclog.Logger.

func (ZapWrapper) Debug

func (w ZapWrapper) Debug(msg string, args ...interface{})

func (ZapWrapper) Error

func (w ZapWrapper) Error(msg string, args ...interface{})

func (ZapWrapper) GetLevel added in v5.4.2

func (w ZapWrapper) GetLevel() hclog.Level

func (ZapWrapper) ImpliedArgs

func (w ZapWrapper) ImpliedArgs() []interface{}

ImpliedArgs has no implementation.

func (ZapWrapper) Info

func (w ZapWrapper) Info(msg string, args ...interface{})

func (ZapWrapper) IsDebug

func (w ZapWrapper) IsDebug() bool

IsDebug has no implementation.

func (ZapWrapper) IsError

func (w ZapWrapper) IsError() bool

IsError has no implementation.

func (ZapWrapper) IsInfo

func (w ZapWrapper) IsInfo() bool

IsInfo has no implementation.

func (ZapWrapper) IsTrace

func (w ZapWrapper) IsTrace() bool

IsTrace has no implementation.

func (ZapWrapper) IsWarn

func (w ZapWrapper) IsWarn() bool

IsWarn has no implementation.

func (ZapWrapper) Log

func (w ZapWrapper) Log(lvl Level, msg string, args ...interface{})

Log logs messages with four simplified levels - Debug,Warn,Error and Info as a default.

func (ZapWrapper) Name

func (w ZapWrapper) Name() string

Name returns a logger's name (if presented).

func (ZapWrapper) Named

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

Named returns a logger with the specific nams. The name string will always be presented in a log messages.

func (ZapWrapper) ResetNamed

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

ResetNamed has the same implementation as Named.

func (ZapWrapper) SetLevel

func (w ZapWrapper) SetLevel(lvl Level)

SetLevel has no implementation.

func (ZapWrapper) StandardLogger

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

StandardLogger returns standard logger with os.Stderr as a writer.

func (ZapWrapper) StandardWriter

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

StandardWriter returns os.Stderr as io.Writer.

func (ZapWrapper) Trace

func (w ZapWrapper) Trace(msg string, args ...interface{})

Trace will log an info-level message in Zap.

func (ZapWrapper) Warn

func (w ZapWrapper) Warn(msg string, args ...interface{})

func (ZapWrapper) With

func (w ZapWrapper) With(args ...interface{}) hclog.Logger

With returns a logger with always-presented key-value pairs.

Jump to

Keyboard shortcuts

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