logs

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package logs provides an interface and implementations for reading and writing streaming logs.

Index

Constants

This section is empty.

Variables

View Source
var Discard = &nullLogger{}

Discard is a Logger that returns noop io.Reader and io.Writers.

View Source
var Stdout = &stdoutLogger{}

Stdout is a Logger that writes logs to os.Stdout.

Functions

This section is empty.

Types

type FSLogger

type FSLogger struct {
	// A directory to store the logs in.
	Dir string
}

FSLogger is a Logger implementation that uses os.Open and os.Create.

func (*FSLogger) Create

func (l *FSLogger) Create(name string) (io.Writer, error)

func (*FSLogger) Open

func (l *FSLogger) Open(name string) (io.Reader, error)

type Logger

type Logger interface {
	// Create returns an io.Writer that can be written to.
	Create(name string) (io.Writer, error)

	// Open returns an io.Reader that can be read from to stream the logs
	// back to the client.
	Open(name string) (io.Reader, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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