lxd: github.com/lxc/lxd/shared/logger Index | Files

package logger

import "github.com/lxc/lxd/shared/logger"

Index

Package Files

format.go log.go

func Crit Uses

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

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

func Critf Uses

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

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

func Debug Uses

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

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

func Debugf Uses

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

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

func Error Uses

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

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

func Errorf Uses

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

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

func GetStack Uses

func GetStack() string

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

func Info Uses

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

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

func Infof Uses

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

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

func Pretty Uses

func Pretty(input interface{}) string

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

func Warn Uses

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

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

func Warnf Uses

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

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

type Logger Uses

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

Package logger imports 3 packages (graph) and is imported by 133 packages. Updated 2017-12-18. Refresh now. Tools for package owners.