log

package
v0.0.0-...-e53fd9e Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentNames

func IdentNames() []string

IdentNames produces a prettified list of quoted identifier strings available to the user for selection as log handler.

Types

type Handler

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

Handler exposes the primary logging interface to main. Right now we depend on the current logging library, need to encapsulate its functionality. See below: Context()

func NewHandler

func NewHandler(out io.Writer, param *config.Parameters) *Handler

NewHandler generates a logging interface based on user's given parameters.

func (*Handler) Context

func (lh *Handler) Context() log.Interface

Context exposes the actual logging library to main. **Ta-da!!

type Ident

type Ident int

Ident represents one of the enumerated log handler's output modes.

const (
	LogNull Ident = iota
	LogStandard
	LogASCII
	LogJSON
	// -- indices --
	LogCountIdent
	LogFirstIdent   = LogNull
	LogDefaultIdent = LogNull
)

constants enumerated values for type Ident.

func ParseIdent

func ParseIdent(str string) Ident

ParseIdent tries to match the user's given input to an Ident.

func (Ident) String

func (id Ident) String() string

Jump to

Keyboard shortcuts

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