log

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutWriter

type OutWriter struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

An OutWriter is responsible for for implementing the io.Writer interface.

func NewOutWriter

func NewOutWriter(logger *logrus.Logger, fmtString string) *OutWriter

NewOutWriter accepts a logger and a format string and returns an OutWriter. When written to, the OutWriter will take the input, split it into lines, and print it to the logger using the provided format string. The intended use case of this functionality is for printing nice, colorful messages

func (*OutWriter) Write

func (ow *OutWriter) Write(p []byte) (n int, err error)

Write writes the provided bytes, one line at a time, after interpolating them into the provided format string, to the provided logger.

Jump to

Keyboard shortcuts

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