MyLog

package module
v0.0.0-...-9a60dfe Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 6 Imported by: 0

README

MyLog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitSet

type BitSet uint8
const (
	LgVerbose  BitSet = 1 << iota // set verbose logging
	LgDebug                       // set debug logging
	LgColor                       // set color mode
	LgBuffer                      // enables log buffer
	LgStandard = 0
)

type Log

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

Log is a type for structured message logging

func (*Log) AddBuffer

func (l *Log) AddBuffer(format string, v ...interface{})

Buffer Handling

func (*Log) Bold

func (l *Log) Bold(format string, v ...interface{})

func (*Log) BoldInfo

func (l *Log) BoldInfo(format string, v ...interface{})

func (*Log) ClearMode

func (l *Log) ClearMode(f BitSet)

func (*Log) Debug

func (l *Log) Debug(format string, v ...interface{})

func (*Log) DisableBuffer

func (l *Log) DisableBuffer()

func (*Log) EnableBuffer

func (l *Log) EnableBuffer()

func (*Log) Error

func (l *Log) Error(format string, v ...interface{})

func (*Log) GetBuffer

func (l *Log) GetBuffer() string

func (*Log) GetMode

func (l *Log) GetMode() BitSet

func (*Log) HasMode

func (l *Log) HasMode(f BitSet) bool

func (*Log) Init

func (l *Log) Init(stdOut, stdErr io.Writer)

LogInit is a member function for Log Inits all logging to given file handle except panic Default mode is "silent" and "no color"

func (*Log) Panic

func (l *Log) Panic(format string, v ...interface{})

User functions

func (*Log) SetColorPrefix

func (l *Log) SetColorPrefix()

func (*Log) SetFlags

func (l *Log) SetFlags(flags int)

func (*Log) SetInteractive

func (l *Log) SetInteractive()

Exposed mode handling functions

func (*Log) SetMode

func (l *Log) SetMode(f BitSet)

func (*Log) SetModeBool

func (l *Log) SetModeBool(f BitSet, b bool)

func (*Log) SetNoPrefix

func (l *Log) SetNoPrefix()

func (*Log) SetOutput

func (l *Log) SetOutput(stdOut, stdErr io.Writer)

func (*Log) Standard

func (l *Log) Standard(format string, v ...interface{})

func (*Log) StandardInfo

func (l *Log) StandardInfo(format string, v ...interface{})

func (*Log) ToggleMode

func (l *Log) ToggleMode(f BitSet)

func (*Log) Verbose

func (l *Log) Verbose(format string, v ...interface{})

func (*Log) VerboseInfo

func (l *Log) VerboseInfo(format string, v ...interface{})

func (*Log) Warn

func (l *Log) Warn(format string, v ...interface{})

Jump to

Keyboard shortcuts

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