log

package
v0.0.0-...-cb7fb10 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(ctx *context.Context, format string, values ...interface{})

func Debugw

func Debugw(ctx *context.Context, message string, keysAndValues ...interface{})

func Errorf

func Errorf(ctx *context.Context, format string, values ...interface{})

func Errorw

func Errorw(ctx *context.Context, message string, keysAndValues ...interface{})

func Fatalf

func Fatalf(ctx *context.Context, format string, values ...interface{})

func Fatalw

func Fatalw(ctx *context.Context, message string, keysAndValues ...interface{})

func Infof

func Infof(ctx *context.Context, format string, values ...interface{})

func Infow

func Infow(ctx *context.Context, message string, keysAndValues ...interface{})

func Init

func Init(loggerConfig Config) (err error)

func TraceBegin

func TraceBegin(ctx *context.Context, message string, keysAndValues ...interface{})

func TraceEnd

func TraceEnd(ctx *context.Context, state interface{})

func TraceEndRoot

func TraceEndRoot(ctx *context.Context, state interface{})

func Warnf

func Warnf(ctx *context.Context, format string, values ...interface{})

func Warnw

func Warnw(ctx *context.Context, message string, keysAndValues ...interface{})

Types

type Config

type Config interface {
	Build() (Logger, error)
}

type Logger

type Logger interface {
	Printf(ctx *context.Context, level string, format string, values ...interface{})
	Printw(ctx *context.Context, level string, message string, keysAndValues ...interface{})
}

type LoggerConfig

type LoggerConfig struct {
	ConfigPath string               `toml:"config-path"`
	Stdout     *output.StdoutConfig `toml:"stdout"`
	Dump       *output.DumpConfig   `toml:"dump"`
}

func DefaultConfig

func DefaultConfig() (*LoggerConfig, error)

func (*LoggerConfig) Build

func (lc *LoggerConfig) Build() (Logger, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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