log

package module
Version: v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 14 Imported by: 37

README

Logger by aah framework

Build Status Code Coverage Go Report Card Release Version Godoc

aah logger is simple and provides capabilities to fulfill application use cases.

News

  • v0.7.1 released and tagged on Jul 22, 2018.

Installation

go get -u aahframework.org/log.v0

Visit official website https://aahframework.org to learn more about aah framework.

Documentation

Overview

Package log simple logger and provides capabilities to fulfill application use cases. It supports two receivers `console` and `file` and extensible by interface and Hook.

Also provides standard logger crossover binding (drop-in replacement for standard go logger) for unified logging.

log.Info("Welcome ", "to ", "aah ", "logger")
log.Infof("%v, %v, %v", "simple", "flexible", "logger")

// Output:
2016-07-03 19:22:11.504 INFO  Welcome to aah logger
2016-07-03 19:22:11.504 INFO  simple, flexible, logger

Index

Constants

View Source
const (
	FmtFlagLevel ess.FmtFlag = iota
	FmtFlagAppName
	FmtFlagInstanceName
	FmtFlagRequestID
	FmtFlagPrincipal
	FmtFlagTime
	FmtFlagUTCTime
	FmtFlagLongfile
	FmtFlagShortfile
	FmtFlagLine
	FmtFlagMessage
	FmtFlagFields
	FmtFlagCustom
	FmtFlagUnknown
)

Format flags used to define log message format for each log entry

View Source
const (
	LevelFatal level = iota
	LevelPanic
	LevelError
	LevelWarn
	LevelInfo
	LevelDebug
	LevelTrace
	LevelUnknown
)

Log Level definition

View Source
const Version = "0.7.1"

Version no. of aahframework.org/log library

Variables

View Source
var (
	// DefaultPattern is default log entry pattern in aah/log. Only applicable to
	// text formatter.
	// For e.g:
	//    2006-01-02 15:04:05.000 INFO  This is my message
	DefaultPattern = "%time:2006-01-02 15:04:05.000 %level:-5 %message"

	// FmtFlags is the list of log format flags supported by aah log library
	// Usage of flag order is up to format composition.
	//    level     - outputs ERROR, WARN, INFO, DEBUG, TRACE
	//    appname   - outputs Application Name
	//    insname   - outputs Application Instance Name
	//    reqid     - outputs Request ID from HTTP header
	//    principal - outputs Logged-In subject primary principal value
	//    time      - outputs local time as per format supplied
	//    utctime   - outputs UTC time as per format supplied
	//    longfile  - outputs full file name: /a/b/c/d.go
	//    shortfile - outputs final file name element: d.go
	//    line      - outputs file line number: L23
	//    message   - outputs given message along supplied arguments if they present
	//    fields    - outputs field values into log entry
	//    custom    - outputs string as-is into log entry
	FmtFlags = map[string]ess.FmtFlag{
		"level":     FmtFlagLevel,
		"appname":   FmtFlagAppName,
		"insname":   FmtFlagInstanceName,
		"reqid":     FmtFlagRequestID,
		"principal": FmtFlagPrincipal,
		"time":      FmtFlagTime,
		"utctime":   FmtFlagUTCTime,
		"longfile":  FmtFlagLongfile,
		"shortfile": FmtFlagShortfile,
		"line":      FmtFlagLine,
		"message":   FmtFlagMessage,
		"fields":    FmtFlagFields,
		"custom":    FmtFlagCustom,
	}
)
View Source
var (
	// ErrLogReceiverIsNil returned when suppiled receiver is nil.
	ErrLogReceiverIsNil = errors.New("log: receiver is nil")

	// ErrHookFuncIsNil is returned when hook function is nil.
	ErrHookFuncIsNil = errors.New("log: hook func is nil")
)

Functions

func AddContext added in v0.7.0

func AddContext(fields Fields)

AddContext method to add context values into default logger. These context values gets logged with each log entry.

func AddHook added in v0.7.0

func AddHook(name string, hook HookFunc) error

AddHook method is to add logger hook function.

func Debug

func Debug(v ...interface{})

Debug logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Print`.

func Debugf

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

Debugf logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Printf`.

func Error

func Error(v ...interface{})

Error logs message as `ERROR`. Arguments handled in the mananer of `fmt.Print`.

func Errorf

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

Errorf logs message as `ERROR`. Arguments handled in the mananer of `fmt.Printf`.

func Fatal

func Fatal(v ...interface{})

Fatal logs message as `FATAL` and call to os.Exit(1).

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf logs message as `FATAL` and call to os.Exit(1).

func Fatalln

func Fatalln(v ...interface{})

Fatalln logs message as `FATAL` and call to os.Exit(1).

func Info

func Info(v ...interface{})

Info logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func Infof

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

Infof logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func IsLevelDebug added in v0.7.0

func IsLevelDebug() bool

IsLevelDebug method returns true if log level is DEBUG otherwise false.

func IsLevelError added in v0.7.0

func IsLevelError() bool

IsLevelError method returns true if log level is ERROR otherwise false.

func IsLevelFatal added in v0.7.0

func IsLevelFatal() bool

IsLevelFatal method returns true if log level is FATAL otherwise false.

func IsLevelInfo added in v0.7.0

func IsLevelInfo() bool

IsLevelInfo method returns true if log level is INFO otherwise false.

func IsLevelPanic added in v0.7.0

func IsLevelPanic() bool

IsLevelPanic method returns true if log level is PANIC otherwise false.

func IsLevelTrace added in v0.7.0

func IsLevelTrace() bool

IsLevelTrace method returns true if log level is TRACE otherwise false.

func IsLevelWarn added in v0.7.0

func IsLevelWarn() bool

IsLevelWarn method returns true if log level is WARN otherwise false.

func Level

func Level() string

Level method returns currently enabled logging level.

func Panic

func Panic(v ...interface{})

Panic logs message as `PANIC` and call to panic().

func Panicf

func Panicf(format string, v ...interface{})

Panicf logs message as `PANIC` and call to panic().

func Panicln

func Panicln(v ...interface{})

Panicln logs message as `PANIC` and call to panic().

func Print

func Print(v ...interface{})

Print logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func Printf

func Printf(format string, v ...interface{})

Printf logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func Println

func Println(v ...interface{})

Println logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func SetDefaultLogger

func SetDefaultLogger(l *Logger)

SetDefaultLogger method sets the given logger instance as default logger.

func SetLevel

func SetLevel(level string) error

SetLevel method sets log level for default logger.

func SetPattern

func SetPattern(pattern string) error

SetPattern method sets the log format pattern for default logger.

func SetWriter added in v0.7.0

func SetWriter(w io.Writer)

SetWriter method sets the given writer into logger instance.

func ToGoLogger added in v0.7.0

func ToGoLogger() *slog.Logger

ToGoLogger method wraps the current log writer into Go Logger instance.

func Trace

func Trace(v ...interface{})

Trace logs message as `TRACE`. Arguments handled in the mananer of `fmt.Print`.

func Tracef

func Tracef(format string, v ...interface{})

Tracef logs message as `TRACE`. Arguments handled in the mananer of `fmt.Printf`.

func Warn

func Warn(v ...interface{})

Warn logs message as `WARN`. Arguments handled in the mananer of `fmt.Print`.

func Warnf

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

Warnf logs message as `WARN`. Arguments handled in the mananer of `fmt.Printf`.

func Writer added in v0.7.0

func Writer() io.Writer

Writer method returns the writer of default logger.

Types

type ConsoleReceiver

type ConsoleReceiver struct {
	// contains filtered or unexported fields
}

ConsoleReceiver writes the log entry into os.Stderr. For non-windows it writes with color.

func (*ConsoleReceiver) Init

func (c *ConsoleReceiver) Init(cfg *config.Config) error

Init method initializes the console logger.

func (*ConsoleReceiver) IsCallerInfo

func (c *ConsoleReceiver) IsCallerInfo() bool

IsCallerInfo method returns true if log receiver is configured with caller info otherwise false.

func (*ConsoleReceiver) Log

func (c *ConsoleReceiver) Log(entry *Entry)

Log method writes the log entry into os.Stderr.

func (*ConsoleReceiver) SetPattern

func (c *ConsoleReceiver) SetPattern(pattern string) error

SetPattern method initializes the logger format pattern.

func (*ConsoleReceiver) SetWriter added in v0.7.0

func (c *ConsoleReceiver) SetWriter(w io.Writer)

SetWriter method sets the given writer into console receiver.

func (*ConsoleReceiver) Writer added in v0.7.0

func (c *ConsoleReceiver) Writer() io.Writer

Writer method returns the current log writer.

type Entry

type Entry struct {
	Level        level     `json:"-"`
	Line         int       `json:"line,omitempty"`
	AppName      string    `json:"app_name,omitempty"`
	InstanceName string    `json:"instance_name,omitempty"`
	RequestID    string    `json:"request_id,omitempty"`
	Principal    string    `json:"principal,omitempty"`
	Message      string    `json:"message,omitempty"`
	File         string    `json:"file,omitempty"`
	Fields       Fields    `json:"fields,omitempty"`
	Time         time.Time `json:"-"`
	// contains filtered or unexported fields
}

Entry represents a log entry and contains the timestamp when the entry was created, level, etc.

func (*Entry) Debug added in v0.7.0

func (e *Entry) Debug(v ...interface{})

Debug logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Debugf added in v0.7.0

func (e *Entry) Debugf(format string, v ...interface{})

Debugf logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) Error added in v0.7.0

func (e *Entry) Error(v ...interface{})

Error logs message as `ERROR`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Errorf added in v0.7.0

func (e *Entry) Errorf(format string, v ...interface{})

Errorf logs message as `ERROR`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) Fatal added in v0.7.0

func (e *Entry) Fatal(v ...interface{})

Fatal logs message as `FATAL` and call to os.Exit(1).

func (*Entry) Fatalf added in v0.7.0

func (e *Entry) Fatalf(format string, v ...interface{})

Fatalf logs message as `FATAL` and call to os.Exit(1).

func (*Entry) Fatalln added in v0.7.0

func (e *Entry) Fatalln(v ...interface{})

Fatalln logs message as `FATAL` and call to os.Exit(1).

func (*Entry) Info added in v0.7.0

func (e *Entry) Info(v ...interface{})

Info logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Infof added in v0.7.0

func (e *Entry) Infof(format string, v ...interface{})

Infof logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) IsLevelDebug added in v0.7.0

func (e *Entry) IsLevelDebug() bool

IsLevelDebug method returns true if log level is DEBUG otherwise false.

func (*Entry) IsLevelError added in v0.7.0

func (e *Entry) IsLevelError() bool

IsLevelError method returns true if log level is ERROR otherwise false.

func (*Entry) IsLevelFatal added in v0.7.0

func (e *Entry) IsLevelFatal() bool

IsLevelFatal method returns true if log level is FATAL otherwise false.

func (*Entry) IsLevelInfo added in v0.7.0

func (e *Entry) IsLevelInfo() bool

IsLevelInfo method returns true if log level is INFO otherwise false.

func (*Entry) IsLevelPanic added in v0.7.0

func (e *Entry) IsLevelPanic() bool

IsLevelPanic method returns true if log level is PANIC otherwise false.

func (*Entry) IsLevelTrace added in v0.7.0

func (e *Entry) IsLevelTrace() bool

IsLevelTrace method returns true if log level is TRACE otherwise false.

func (*Entry) IsLevelWarn added in v0.7.0

func (e *Entry) IsLevelWarn() bool

IsLevelWarn method returns true if log level is WARN otherwise false.

func (*Entry) MarshalJSON

func (e *Entry) MarshalJSON() ([]byte, error)

MarshalJSON method for formating entry to JSON.

func (*Entry) Panic added in v0.7.0

func (e *Entry) Panic(v ...interface{})

Panic logs message as `PANIC` and call to panic().

func (*Entry) Panicf added in v0.7.0

func (e *Entry) Panicf(format string, v ...interface{})

Panicf logs message as `PANIC` and call to panic().

func (*Entry) Panicln added in v0.7.0

func (e *Entry) Panicln(v ...interface{})

Panicln logs message as `PANIC` and call to panic().

func (*Entry) Print added in v0.7.0

func (e *Entry) Print(v ...interface{})

Print logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Printf added in v0.7.0

func (e *Entry) Printf(format string, v ...interface{})

Printf logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) Println added in v0.7.0

func (e *Entry) Println(v ...interface{})

Println logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) Reset

func (e *Entry) Reset()

Reset method resets the `Entry` values for reuse.

func (*Entry) ToGoLogger added in v0.7.0

func (e *Entry) ToGoLogger() *slog.Logger

ToGoLogger method wraps the current log writer into Go Logger instance.

func (*Entry) Trace added in v0.7.0

func (e *Entry) Trace(v ...interface{})

Trace logs message as `TRACE`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Tracef added in v0.7.0

func (e *Entry) Tracef(format string, v ...interface{})

Tracef logs message as `TRACE`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) Warn added in v0.7.0

func (e *Entry) Warn(v ...interface{})

Warn logs message as `WARN`. Arguments handled in the mananer of `fmt.Print`.

func (*Entry) Warnf added in v0.7.0

func (e *Entry) Warnf(format string, v ...interface{})

Warnf logs message as `WARN`. Arguments handled in the mananer of `fmt.Printf`.

func (*Entry) WithField added in v0.7.0

func (e *Entry) WithField(key string, value interface{}) Loggerer

WithField method to add single key-value into log

func (*Entry) WithFields added in v0.7.0

func (e *Entry) WithFields(fields Fields) Loggerer

WithFields method to add multiple key-value pairs into log.

type Fields added in v0.7.0

type Fields map[string]interface{}

Fields type is used to log fields values in the logger.

type FileReceiver

type FileReceiver struct {
	// contains filtered or unexported fields
}

FileReceiver writes the log entry into file.

func (*FileReceiver) Init

func (f *FileReceiver) Init(cfg *config.Config) error

Init method initializes the file receiver instance.

func (*FileReceiver) IsCallerInfo

func (f *FileReceiver) IsCallerInfo() bool

IsCallerInfo method returns true if log receiver is configured with caller info otherwise false.

func (*FileReceiver) Log

func (f *FileReceiver) Log(entry *Entry)

Log method logs the given entry values into file.

func (*FileReceiver) SetPattern

func (f *FileReceiver) SetPattern(pattern string) error

SetPattern method initializes the logger format pattern.

func (*FileReceiver) SetWriter added in v0.7.0

func (f *FileReceiver) SetWriter(w io.Writer)

SetWriter method sets the given writer into file receiver.

func (*FileReceiver) Writer added in v0.7.0

func (f *FileReceiver) Writer() io.Writer

Writer method returns the current log writer.

type FlagPart

type FlagPart struct {
	Flag   ess.FmtFlag
	Name   string
	Format string
}

FlagPart is indiviual flag details

For e.g.:
  part := FlagPart{
    Flag:   fmtFlagTime,
    Name:   "time",
    Format: "2006-01-02 15:04:05.000",
  }

type HookFunc added in v0.7.0

type HookFunc func(e Entry)

HookFunc type is aah framework logger custom hook.

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is the object which logs the given message into recevier as per deifned format flags. Logger can be used simultaneously from multiple goroutines; it guarantees to serialize access to the Receivers.

func New

func New(cfg *config.Config) (*Logger, error)

New method creates the aah logger based on supplied `config.Config`.

func NewWithContext added in v0.7.0

func NewWithContext(cfg *config.Config, ctx Fields) (*Logger, error)

NewWithContext method creates the aah logger based on supplied `config.Config`.

func (*Logger) AddContext added in v0.7.0

func (l *Logger) AddContext(fields Fields)

AddContext method to add context values into current logger.

func (*Logger) AddHook added in v0.7.0

func (l *Logger) AddHook(name string, hook HookFunc) error

AddHook method is to add logger hook function.

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

Debug logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

Debugf logs message as `DEBUG`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

Error logs message as `ERROR`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

Errorf logs message as `ERROR`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

Fatal logs message as `FATAL` and call to os.Exit(1).

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...interface{})

Fatalf logs message as `FATAL` and call to os.Exit(1).

func (*Logger) Fatalln

func (l *Logger) Fatalln(v ...interface{})

Fatalln logs message as `FATAL` and call to os.Exit(1).

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

Info logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...interface{})

Infof logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) IsLevelDebug added in v0.7.0

func (l *Logger) IsLevelDebug() bool

IsLevelDebug method returns true if log level is DEBUG otherwise false.

func (*Logger) IsLevelError added in v0.7.0

func (l *Logger) IsLevelError() bool

IsLevelError method returns true if log level is ERROR otherwise false.

func (*Logger) IsLevelFatal added in v0.7.0

func (l *Logger) IsLevelFatal() bool

IsLevelFatal method returns true if log level is FATAL otherwise false.

func (*Logger) IsLevelInfo added in v0.7.0

func (l *Logger) IsLevelInfo() bool

IsLevelInfo method returns true if log level is INFO otherwise false.

func (*Logger) IsLevelPanic added in v0.7.0

func (l *Logger) IsLevelPanic() bool

IsLevelPanic method returns true if log level is PANIC otherwise false.

func (*Logger) IsLevelTrace added in v0.7.0

func (l *Logger) IsLevelTrace() bool

IsLevelTrace method returns true if log level is TRACE otherwise false.

func (*Logger) IsLevelWarn added in v0.7.0

func (l *Logger) IsLevelWarn() bool

IsLevelWarn method returns true if log level is WARN otherwise false.

func (*Logger) Level

func (l *Logger) Level() string

Level method returns currently enabled logging level.

func (*Logger) New added in v0.7.0

func (l *Logger) New(fields Fields) *Logger

New method creates a child logger and adds structured context to it. Child logger inherits parent logger context value on creation. Fields added to the child don't affect the parent logger and vice versa. These context values gets logged with each log entry.

Also you can use method `AddContext` to context to the current logger.

func (*Logger) Panic

func (l *Logger) Panic(v ...interface{})

Panic logs message as `PANIC` and call to panic().

func (*Logger) Panicf

func (l *Logger) Panicf(format string, v ...interface{})

Panicf logs message as `PANIC` and call to panic().

func (*Logger) Panicln

func (l *Logger) Panicln(v ...interface{})

Panicln logs message as `PANIC` and call to panic().

func (*Logger) Print

func (l *Logger) Print(v ...interface{})

Print logs message as `INFO`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...interface{})

Printf logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) Println

func (l *Logger) Println(v ...interface{})

Println logs message as `INFO`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level string) error

SetLevel method sets the given logging level for the logger. For e.g.: INFO, WARN, DEBUG, etc. Case-insensitive.

func (*Logger) SetPattern

func (l *Logger) SetPattern(pattern string) error

SetPattern method sets the log format pattern.

func (*Logger) SetReceiver

func (l *Logger) SetReceiver(receiver Receiver) error

SetReceiver method sets the given receiver into logger instance.

func (*Logger) SetWriter added in v0.7.0

func (l *Logger) SetWriter(w io.Writer)

SetWriter method sets the given writer into logger instance.

func (*Logger) ToGoLogger added in v0.7.0

func (l *Logger) ToGoLogger() *slog.Logger

ToGoLogger method wraps the current log writer into Go Logger instance.

func (*Logger) Trace

func (l *Logger) Trace(v ...interface{})

Trace logs message as `TRACE`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Tracef

func (l *Logger) Tracef(format string, v ...interface{})

Tracef logs message as `TRACE`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

Warn logs message as `WARN`. Arguments handled in the mananer of `fmt.Print`.

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

Warnf logs message as `WARN`. Arguments handled in the mananer of `fmt.Printf`.

func (*Logger) WithField added in v0.7.0

func (l *Logger) WithField(key string, value interface{}) Loggerer

WithField method to add single key-value into log entry.

func (*Logger) WithFields added in v0.7.0

func (l *Logger) WithFields(fields Fields) Loggerer

WithFields method to add multiple key-value pairs into log entry.

type Loggerer added in v0.7.0

type Loggerer interface {
	Error(v ...interface{})
	Errorf(format string, v ...interface{})
	Warn(v ...interface{})
	Warnf(format string, v ...interface{})
	Info(v ...interface{})
	Infof(format string, v ...interface{})
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})
	Trace(v ...interface{})
	Tracef(format string, v ...interface{})

	// Context/Field methods
	WithFields(fields Fields) Loggerer
	WithField(key string, value interface{}) Loggerer

	// Level Info
	IsLevelInfo() bool
	IsLevelError() bool
	IsLevelWarn() bool
	IsLevelDebug() bool
	IsLevelTrace() bool
	IsLevelFatal() bool
	IsLevelPanic() bool

	// For standard logger drop-in replacement
	ToGoLogger() *slog.Logger
	Print(v ...interface{})
	Printf(format string, v ...interface{})
	Println(v ...interface{})
	Fatal(v ...interface{})
	Fatalf(format string, v ...interface{})
	Fatalln(v ...interface{})
	Panic(v ...interface{})
	Panicf(format string, v ...interface{})
	Panicln(v ...interface{})
}

Loggerer interface is for Logger and Entry log method implementation.

func WithField added in v0.7.0

func WithField(key string, value interface{}) Loggerer

WithField method to add single key-value into log

func WithFields added in v0.7.0

func WithFields(fields Fields) Loggerer

WithFields method to add multiple key-value pairs into log.

type Receiver

type Receiver interface {
	Init(cfg *config.Config) error
	SetPattern(pattern string) error
	SetWriter(w io.Writer)
	IsCallerInfo() bool
	Writer() io.Writer
	Log(e *Entry)
}

Receiver is the interface for pluggable log receiver. For e.g: Console, File

Jump to

Keyboard shortcuts

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