filter

package
v0.0.0-...-2d8c917 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package filter provides an appender which has filter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender

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

Appender is an logging appender which supports level threshold, inclusive or exclusive logger name.

func NewAppender

func NewAppender(a gol.Appender) *Appender

NewAppender allocates and returns a new Appender

func (*Appender) Append

func (a *Appender) Append(e *gol.LoggingEvent)

Append only send logging event to the assigned appender only when: - Logging level >= Threshold - Logger name is not in the excludes - Logger name is in the includes

func (*Appender) SetExcludes

func (a *Appender) SetExcludes(excludes ...string)

SetExcludes set exclusive logger names.

func (*Appender) SetIncludes

func (a *Appender) SetIncludes(includes ...string)

SetIncludes set inclusive logger names.

func (*Appender) SetThreshold

func (a *Appender) SetThreshold(t gol.Level)

SetThreshold change logging threshold.

Jump to

Keyboard shortcuts

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