simple

package
v0.0.0-...-c781833 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger generic struct for a logger.

func New

func New(f gol.LogFilter, fmt gol.LogFormatter, w io.Writer) *Logger

New creates and initializes a generic logger struct.

func (*Logger) Close

func (l *Logger) Close()

Close closes the log message channel and waits for all processing to complete.

func (*Logger) Filter

func (l *Logger) Filter() gol.LogFilter

Filter returns the logger filter.

func (*Logger) Formatter

func (l *Logger) Formatter() gol.LogFormatter

Formatter returns the logger formatter.

func (*Logger) Run

func (l *Logger) Run(c chan *gol.LogMessage)

Run runs a go routine to process messages from the logger channel.

func (*Logger) Send

func (l *Logger) Send(m *gol.LogMessage) (err error)

Send process log message.

func (*Logger) SetFilter

func (l *Logger) SetFilter(f gol.LogFilter) error

SetFilter sets the logger filter.

func (*Logger) SetFormatter

func (l *Logger) SetFormatter(f gol.LogFormatter) error

SetFormatter sets the logger formatter.

func (*Logger) SetWriter

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

SetWriter sets the logger writer.

func (*Logger) Status

func (l *Logger) Status() bool

Status returns the logger running status. True means the logger go routine is running; False otherwise.

func (*Logger) Writer

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

Writer returns the logger writer.

Jump to

Keyboard shortcuts

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