Documentation

Overview

Plumbing for teeing/tailing log messages. Plop this between your root logger and stderr and you'll be tailing log messages efficiently and programmatically for e.g. your GUI

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLineSplitterTee

func NewLineSplitterTee(sink io.Writer, lineCompleted func(string)) io.Writer

returns io.Writer that tees full lines to lineCompleted callback

Types

type StringTail

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

func NewStringTail

func NewStringTail(capacity int) *StringTail

keeps only "capacity" last Write() calls (which you can retrieve with Snapshot() )

func (*StringTail) Snapshot

func (t *StringTail) Snapshot() []string

func (*StringTail) Write

func (t *StringTail) Write(line string)