logger

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	GetId() string
	GetGitHash() string
	GetName() string
}

type Log

type Log struct {
	*zap.SugaredLogger
}

func CLILogger

func CLILogger() *Log

func DevLogger

func DevLogger() *Log

func ProdLogger

func ProdLogger() *Log

func (*Log) DebugInterface

func (log *Log) DebugInterface(v interface{}, template string, args ...interface{})

DebugInterface marshals the interface to indented JSON. Since this operation is mildly expensive it is only performed if the logger is at debug level.

A newline and marshaled JSON is automatically appended to the log message. It should not be included in the template.

func (*Log) DisableStacktrace

func (log *Log) DisableStacktrace() *Log

DisableStacktrace disables writing of stack traces except at panic level.

func (*Log) IncreaseLevel

func (log *Log) IncreaseLevel(lvl zapcore.LevelEnabler) *Log

IncreaseLevel increase the level of the logger. It has no effect if the passed in level tries to decrease the level of the logger.

func (*Log) Named

func (log *Log) Named(name string) *Log

func (*Log) With

func (log *Log) With(args ...interface{}) *Log

func (*Log) WithComponent

func (log *Log) WithComponent(comp Component) *Log

func (*Log) WithPlatform

func (log *Log) WithPlatform(val string) *Log

Jump to

Keyboard shortcuts

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