file

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: 3 Imported by: 0

Documentation

Overview

Package file provides logging to file.

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 a file appender with rolling policy.

func NewAppender

func NewAppender(fileName string) *Appender

NewAppender allocates and returns a new Appender. Calling Start is only needed for catching errors.

func (*Appender) Append

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

Append encodes the given logging event to file.

func (*Appender) SetRollingPolicy

func (a *Appender) SetRollingPolicy(policy rotation.RollingPolicy)

SetRollingPolicy changes the rolling policy of this appender.

func (*Appender) SetTriggeringPolicy

func (a *Appender) SetTriggeringPolicy(policy rotation.TriggeringPolicy)

SetTriggeringPolicy changes the triggering policy of this appender.

func (*Appender) Start

func (a *Appender) Start() error

Start opens the log file.

func (*Appender) Stop

func (a *Appender) Stop() error

Stop closes the log file.

Directories

Path Synopsis
Package rotation provides triggering and rolling policy for system files.
Package rotation provides triggering and rolling policy for system files.

Jump to

Keyboard shortcuts

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