log

package
v0.0.0-...-30ff302 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package log sets up a shared zap.Logger that can be used by all packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*zap.SugaredLogger
}

Logger is a wrapper around zap.SugaredLogger

func Init

func Init(service string) (Logger, func() error, error)

Init initializes the logging system and sets the "service" key to the provided argument. This func should only be called once and after flag.Parse() has been called otherwise leveled logging will not be configured correctly.

func (Logger) AddCallerSkip

func (l Logger) AddCallerSkip(skip int) Logger

func (Logger) Notice

func (l Logger) Notice(args ...interface{})

func (Logger) Package

func (l Logger) Package(pkg string) Logger

func (Logger) Trace

func (l Logger) Trace(args ...interface{})

func (Logger) Warning

func (l Logger) Warning(args ...interface{})

func (Logger) With

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

Jump to

Keyboard shortcuts

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