logger

package
v0.0.0-...-9ee0041 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedLogWriter

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

BufferedLogWriter represents a logging object that generates output to a buffer.

func (*BufferedLogWriter) Len

func (l *BufferedLogWriter) Len() int

Len returns the length of the buffer

func (*BufferedLogWriter) ReadAll

func (l *BufferedLogWriter) ReadAll() string

ReadAll reads all the data from the buffer into a string

func (*BufferedLogWriter) Reset

func (l *BufferedLogWriter) Reset()

Reset resets the buffer to empty

func (*BufferedLogWriter) Write

func (l *BufferedLogWriter) Write(b []byte) (int, error)

Write writes the given data to the buffer

func (*BufferedLogWriter) WriteString

func (l *BufferedLogWriter) WriteString(s string) (int, error)

WriteString writes a string to the buffer

type LogWriter

type LogWriter struct {
	*log.Logger
}

LogWriter is a wrapper for the standard logger to implement io.Writer

func NewLogWriter

func NewLogWriter(out io.Writer, prefix string, flag int) *LogWriter

NewLogWriter create a new LogWriter

func (*LogWriter) Write

func (l *LogWriter) Write(b []byte) (int, error)

Write writes the given data to the underlying logger

Jump to

Keyboard shortcuts

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