logger

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

package logger is a simple wrapper for a log-interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(s string, js ...interface{})

Types

type AppLogger

type AppLogger struct {
	zerolog.Logger
}

func GetLogger

func GetLogger(label string) AppLogger

func GetLoggerWithLevel

func GetLoggerWithLevel(label, level string) AppLogger

func InitLogger

func InitLogger(cfg LogConfig) AppLogger

func With

func With(l zerolog.Logger) AppLogger

func (*AppLogger) ErrErr

func (al *AppLogger) ErrErr(err error) *zerolog.Event

func (*AppLogger) ErrWarn

func (al *AppLogger) ErrWarn(err error) *zerolog.Event

func (*AppLogger) HasDebug

func (al *AppLogger) HasDebug() bool

func (*AppLogger) HasTrace

func (al *AppLogger) HasTrace() bool

func (*AppLogger) WithStringPairs

func (al *AppLogger) WithStringPairs(pairs ...string) AppLogger

type LogConfig

type LogConfig struct {
	Level      string
	Format     string
	WithCaller bool
}

Jump to

Keyboard shortcuts

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