logger

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const Elapsed = "Elapsed"

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin interface {
	IsUserAdmin(mattermostUserID string) bool
	DMAdmins(format string, args ...interface{}) error
}

func NewAdmin

func NewAdmin(adminUserIDs string, p poster.DMer) Admin

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, api plugin.API, p poster.DMer, adminUserIDs string) 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