logging

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogrusLogger *logrus.Logger
)

Log is the importable logger

Functions

func Initialise

func Initialise(opts Opts)

Initialise sets the logger

func IsInitialised

func IsInitialised() bool

IsInitialised returns if the logger is set up correctly

func Log

func Log() bark.Logger

Log wraps logrus logging with the service fields

func Logger

func Logger() bark.Logger

Logger returns the logger object for use

func Use

func Use(newLogger bark.Logger)

Use initialises the logger package from an existing generic logger

func WithFields

func WithFields(f Fields) bark.Logger

WithFields is an alias for logrus.WithFields to accept our own

Types

type Fields

type Fields = bark.Fields

Fields is an alias for bark.Fields

type Opts

type Opts struct {
	ServiceName  string
	ServiceGroup string
	Level        string

	Hooks []logrus.Hook

	Formatter logrus.Formatter
}

Opts configures various logging options

Jump to

Keyboard shortcuts

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