writers

package
v0.0.0-...-1856138 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericLogWriter

type GenericLogWriter struct{}

GenericLogWriter ...

func NewGenericLogWriter

func NewGenericLogWriter() *GenericLogWriter

NewGenericLogWriter ...

func (*GenericLogWriter) Log

func (lw *GenericLogWriter) Log(priority int, val string) error

Log - this implementation logs string message along with a specified priority

type HighPriorityLogWriter

type HighPriorityLogWriter struct {
	*LockedPriorityLogWriter
}

HighPriorityLogWriter - this type of LogWriter will always try to log messages with the highest priority, automatically and specified priority needed

func NewHighPriorityLogWriter

func NewHighPriorityLogWriter() *HighPriorityLogWriter

NewHighPriorityLogWriter really just a special LockedPriorityWriter

func (*HighPriorityLogWriter) Log

func (lw *HighPriorityLogWriter) Log(val string) error

Log - this implementation will always try to log messages with the initialized priority

type LazyLogWriter

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

LazyLogWriter ...

func NewLazyLogWriter

func NewLazyLogWriter(priority int) *LazyLogWriter

NewLazyLogWriter ...

func (*LazyLogWriter) Flush

func (lw *LazyLogWriter) Flush() error

Flush - Actually send the log to the system

func (*LazyLogWriter) Log

func (lw *LazyLogWriter) Log(val string)

Log - this implementation logs string message along with a specified priority

type LockedPriorityLogWriter

type LockedPriorityLogWriter struct {
	Priority int
}

LockedPriorityLogWriter - this type of LogWriter will always try to log messages with the highest priority, automatically and specified priority needed

func NewLockedPriorityLogWriter

func NewLockedPriorityLogWriter(priority int) *LockedPriorityLogWriter

NewLockedPriorityLogWriter ...

func (*LockedPriorityLogWriter) Log

func (lw *LockedPriorityLogWriter) Log(val string) error

Log - this implementation will always try to log messages with the initialized priority

Jump to

Keyboard shortcuts

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