log

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = zerolog.New(os.Stdout).With().Timestamp().Logger()

Logger is the global logger with predefined settings

Functions

func Debug

func Debug(msg string)

Debug prints message with DEBUG severity

func Debugf

func Debugf(format string, v ...interface{})

Debugf prints formatted message with DEBUG severity

func Debugln

func Debugln(v ...interface{})

Debugln concatenates arguments and prints them with DEBUG severity

func Error

func Error(msg string)

Error prints message with ERROR severity

func Errorf

func Errorf(format string, v ...interface{})

Errorf prints formatted message with ERROR severity

func Errorln

func Errorln(v ...interface{})

Errorln concatenates arguments and prints them with ERROR severity

func Info

func Info(msg string)

Info prints message with INFO severity

func Infof

func Infof(format string, v ...interface{})

Infof prints formatted message with INFO severity

func Infoln

func Infoln(v ...interface{})

Infoln concatenates arguments and prints them with INFO severity

func KVError

func KVError(kv KV, msg string)

KVError prints message with ERROR severity with attached KV map

func KVErrorf

func KVErrorf(kv KV, format string, v ...interface{})

KVErrorf prints formatted message with ERROR severity with attached KV map

func KVErrorln

func KVErrorln(kv KV, v ...interface{})

KVErrorln concatenates arguments and prints them with ERROR severity with attached KV map

func New

func New() zerolog.Logger

func SetApplication

func SetApplication(app string)

SetApplication appends application name string to log messages

func SetLevel

func SetLevel(level string)

SetLevel sets logging level

func Warn

func Warn(msg string)

Warn prints message with WARNING severity

func Warnf

func Warnf(format string, v ...interface{})

Warnf prints formatted message with WARNING severity

func Warnln

func Warnln(v ...interface{})

Warnln concatenates arguments and prints them with WARNING severity

Types

type KV

type KV map[string]string

KV is a simple key-value store

Jump to

Keyboard shortcuts

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