rotatablesink

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFileWriter

func DefaultFileWriter(fileName string) (io.Writer, error)

Types

type DefaultDestinationFileInfo

type DefaultDestinationFileInfo struct{}

func (DefaultDestinationFileInfo) FileExists

func (DefaultDestinationFileInfo) FileExists(filename string) (bool, error)

func (DefaultDestinationFileInfo) FileInode

func (DefaultDestinationFileInfo) FileInode(filename string) (uint64, error)

type DefaultFileWriterFunc

type DefaultFileWriterFunc func(string) (io.Writer, error)

func (DefaultFileWriterFunc) NewWriter

func (dfwf DefaultFileWriterFunc) NewWriter(fileName string) (io.Writer, error)

type DestinationFileInfo

type DestinationFileInfo interface {
	FileExists(string) (bool, error)
	FileInode(string) (uint64, error)
}

type FileWriterFactory

type FileWriterFactory interface {
	NewWriter(fileName string) (io.Writer, error)
}

type RotatableSink

type RotatableSink struct {
	WriterFactory FileWriterFactory

	DestinationFileInfo DestinationFileInfo
	// contains filtered or unexported fields
}

func NewRotatableSink

func NewRotatableSink(fileToWatch string, logLevel lager.LogLevel, fileWriterFactory FileWriterFactory, destinationFileInfo DestinationFileInfo, componentLogger lager.Logger) (*RotatableSink, error)

func (*RotatableSink) Log

func (rs *RotatableSink) Log(logFmt lager.LogFormat)

Jump to

Keyboard shortcuts

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