logging

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logging contains utilities for writing logs.

Index

Constants

This section is empty.

Variables

View Source
var Flags = flag.Flags{
	&flag.String{
		Name:        "log-level",
		Usage:       "Sets the verbosity of logs (panic, fatal, error, warn, info, debug & trace)",
		EnvVar:      "LOG_LEVEL",
		Value:       "error",
		Destination: &level,
	},
}

Flags contains all command-line flags used by the logger.

Functions

func Info

func Info(args ...interface{})

Info writes an info level log.

func Init

func Init()

Init initialises the logger.

func JaegerLogger

func JaegerLogger() jaeger.Logger

JaegerLogger returns the standard logger as an implementation of jaeger.Logger.

func Logger

func Logger() *logrus.Logger

Logger returns the global logger.

func WithError

func WithError(err error) *logrus.Entry

WithError adds an error to the log.

func WithField

func WithField(k string, v interface{}) *logrus.Entry

WithField adds a field to the log.

Types

This section is empty.

Jump to

Keyboard shortcuts

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