output

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BrightGreen bright green output colour
	BrightGreen = iota
	// BrightYellow bright yellow output colour
	BrightYellow
	// BrightBlue bright blue output colour
	BrightBlue
	// BrightRed bright red output colour
	BrightRed
	// NoColour no output colour
	NoColour // Can use to default to no colour output
)

Variables

This section is empty.

Functions

func Colour

func Colour(colour int, input ...string) string

Colour print in outputColour

func GetOutput added in v0.1.3

func GetOutput(input string) (output string, err error)

GetOutput get output from a log line consisting of the timestamp prefix and potentially JSON payload

func IndentJSON added in v0.1.3

func IndentJSON(input string) (result string, err error)

IndentJSON read json in then write it out indented

func SetColour

func SetColour(use bool)

SetColour set whether or not to use colour output

Types

type FollowedFile

type FollowedFile struct {
	Path string
	Tail *tail.Tail
	// contains filtered or unexported fields
}

FollowedFile a file being tailed (followed). Uses the tail library which has undoubtedly taken many hours to get working well.

func NewFollowedFileForPath

func NewFollowedFileForPath(path string) (ff *FollowedFile, err error)

NewFollowedFileForPath create a new file that will start tailing

func (*FollowedFile) Unlock

func (ff *FollowedFile) Unlock()

Unlock channel for file by writing to channel

Jump to

Keyboard shortcuts

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