termlogger

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTimeFormat string = "20060102-150405"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsciinemaHook

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

func (*AsciinemaHook) Close

func (aLog *AsciinemaHook) Close() error

Close the STDOut keystroke channel for logging

func (*AsciinemaHook) Fire

func (aLog *AsciinemaHook) Fire(entry *log.Entry) error

func (*AsciinemaHook) Levels

func (aLog *AsciinemaHook) Levels() []log.Level

type DummyWriter

type DummyWriter struct{}

DummyWriter is a writer that discard everything that writes in Consider like writing into /dev/null

func (DummyWriter) Write

func (DummyWriter) Write(p []byte) (int, error)

type LogHook

type LogHook interface {
	io.Closer
	logrus.Hook
}

func NewAsciinemaHook

func NewAsciinemaHook(width, height int, apiEndPt, apiKey string, params map[string]string, fileName string) (LogHook, error)

NewAsciinemaHook creates a new Asciinema hook

func NewUMLHook

func NewUMLHook(ttyID uint32, logFile string) (LogHook, error)

NewUMLHook creates a new logrus hook instance and will create the UML log file

type StdIOErr

type StdIOErr interface {
	In() io.Reader
	Out() io.Writer
	Err() io.Writer
	Close() error
}

func NewLogger

func NewLogger(logHook LogHook, in io.Reader, out, err io.Writer) StdIOErr

NewLogger creates a Logger instance

type TTYDirection

type TTYDirection int32

TTYDirection specifies the direction of data

const (
	// TTYRead Indicates reading from terminal
	TTYRead TTYDirection = 1
	// TTYWrite Indicates writing to terminal
	TTYWrite TTYDirection = 2
)

type UMLHook

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

UmlLog is the instance for storing logging information, like io

func (*UMLHook) Close

func (uLog *UMLHook) Close() error

Close closes the log file for writing UML logs

func (*UMLHook) Fire

func (uLog *UMLHook) Fire(entry *log.Entry) error

func (*UMLHook) Levels

func (uLog *UMLHook) Levels() []log.Level

Jump to

Keyboard shortcuts

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