logger

package
Version: v0.0.0-...-b84de06 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crit

func Crit(msg string, ctx ...interface{})

Crit logs a message (with optional context) at the CRITICAL log level

func Critf

func Critf(format string, args ...interface{})

Critf logs at the CRITICAL log level using a standard printf format string

func Debug

func Debug(msg string, ctx ...interface{})

Debug logs a message (with optional context) at the DEBUG log level

func Debugf

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

Debugf logs at the DEBUG log level using a standard printf format string

func Error

func Error(msg string, ctx ...interface{})

Error logs a message (with optional context) at the ERROR log level

func Errorf

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

Errorf logs at the ERROR log level using a standard printf format string

func GetStack

func GetStack() string

GetStack will convert the Go stack into a string suitable for logging

func Info

func Info(msg string, ctx ...interface{})

Info logs a message (with optional context) at the INFO log level

func Infof

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

Infof logs at the INFO log level using a standard printf format string

func Pretty

func Pretty(input interface{}) string

Pretty will attempt to convert any Go structure into a string suitable for logging

func Warn

func Warn(msg string, ctx ...interface{})

Warn logs a message (with optional context) at the WARNING log level

func Warnf

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

Warnf logs at the WARNING log level using a standard printf format string

Types

type Logger

type Logger interface {
	Debug(msg string, ctx ...interface{})
	Info(msg string, ctx ...interface{})
	Warn(msg string, ctx ...interface{})
	Error(msg string, ctx ...interface{})
	Crit(msg string, ctx ...interface{})
}

Logger is the main logging interface

var Log Logger

Log contains the logger used by all the logging functions

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL