logtee

package
v0.0.0-...-ea0be71 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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)

Jump to

Keyboard shortcuts

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