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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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