output

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BackgroundOffset = 31
View Source
const TimeFormat = "15:04:05"

Variables

This section is empty.

Functions

func FromTemplate

func FromTemplate(log *Logger, tmpl string, ob interface{}) string

Types

type Data

type Data map[string]string

type LineBreaker

type LineBreaker struct {
	Output chan Message
	ID     string
	// contains filtered or unexported fields
}

func NewLineBreaker

func NewLineBreaker(out chan Message, ID string) *LineBreaker

func (*LineBreaker) Write

func (w *LineBreaker) Write(p []byte) (int, error)

type Logger

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

func NewLogger

func NewLogger(debug bool, opts ...LoggerOption) *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(s string, args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(s string, args ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(s string, args ...interface{})

type LoggerOption

type LoggerOption = func(*Logger)

func WithOut

func WithOut(out io.Writer) LoggerOption

type Message

type Message struct {
	Content string
	ID      string
}

type StructuredLog

type StructuredLog struct {
	Level     string
	Timestamp string
	Parsed    string
}

func ParseToStructured

func ParseToStructured(l string) StructuredLog

type Style

type Style = []interface{}

type Styler

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

func (*Styler) Next

func (s *Styler) Next() Style

Jump to

Keyboard shortcuts

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