logger

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Elapsed = "Elapsed"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AdminLogLevel is "debug", "info", "warn", or "error".
	AdminLogLevel string

	// AdminLogVerbose: set to include full context with admin log messages.
	AdminLogVerbose bool
}

func (Config) ToStorableConfig

func (c Config) ToStorableConfig(configMap map[string]interface{}) map[string]interface{}

type LogContext

type LogContext map[string]interface{}

type Logger

type Logger interface {
	With(LogContext) Logger
	Timed() Logger
	Debugf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
}

func NewLogger

func NewLogger(c Config, p poster.Poster, a bot.Admin, api plugin.API) Logger

func NewNilLogger

func NewNilLogger() Logger

func NewTestLogger

func NewTestLogger() Logger

Jump to

Keyboard shortcuts

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