Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, entry *LoggerEntry)

Register registers a logger

func Setup

func Setup(name string, cfg *Config)

Setup loggers globally

Types

type Config

type Config mate.LoggerConfig

Config is the configuration of the logrus logger

type Logger

type Logger interface {
	SetLogLevel(level string)
	LogLevel() string
	Debugf(f string, v ...interface{})
	Debug(v ...interface{})
	Infof(f string, v ...interface{})
	Info(v ...interface{})
	Warnf(f string, v ...interface{})
	Warn(v ...interface{})
	Errorf(f string, v ...interface{})
	Error(v ...interface{})
	Fatalf(f string, v ...interface{})
	Fatal(v ...interface{})
	Panicf(f string, v ...interface{})
	Panic(v ...interface{})
}

Logger defines the box log functions

func NewLogger

func NewLogger(name, tag string) Logger

NewLogger creates a new logger.

type LoggerEntry

type LoggerEntry struct {
	Setup     setupFunc
	NewLogger newLoggerFunc
}

LoggerEntry is a logger impl entry

Jump to

Keyboard shortcuts

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