bserr

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Level = 4
)

Functions

func Err

func Err(e error, msg ...string) bool

func ErrSkipTrace

func ErrSkipTrace(e error, msg ...string) bool

func Error added in v0.0.24

func Error(e error, testMode bool, msg ...string) error

func NeedsQuoting

func NeedsQuoting(text string) bool

func NewErr

func NewErr() ers.Error

func NoPrintErr

func NoPrintErr(e error) bool

func NotErr

func NotErr(e error, msg ...string) bool

func NotErrSkipTrace

func NotErrSkipTrace(e error, msg ...string) bool

func StopErr

func StopErr(e error, msg ...string)

func WarnErr

func WarnErr(e error, msg ...string) bool

Types

type BSErr

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

func (*BSErr) Err

func (er *BSErr) Err(e error, skipTrace bool, msg ...string) bool

Err check for error and output message if one is passed in

func (*BSErr) ErrFullStack added in v0.0.24

func (er *BSErr) ErrFullStack(e error, test bool, msg ...string) error

func (*BSErr) NoPrintErr

func (er *BSErr) NoPrintErr(e error) bool

NoPrintErr is this an Error if so don't print, used in if/else

func (*BSErr) NotErr

func (er *BSErr) NotErr(e error, msg ...string) bool

NotErr check for NO error and output message if one is passed in

func (*BSErr) NotErrSkipTrace

func (er *BSErr) NotErrSkipTrace(e error, skipTrace bool, msg ...string) bool

NotErr check for NO error and output message if one is passed in

func (*BSErr) StopErr

func (er *BSErr) StopErr(e error, msg ...string)

StopErr check for error, output message if one is passed in and stop execution

func (*BSErr) WarnErr

func (er *BSErr) WarnErr(e error, msg ...string) bool

type ErrStack

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

type TextFormatter

type TextFormatter struct {
	log.TextLayout

	FormatValue func(value interface{}) string
	// contains filtered or unexported fields
}

TextFormatter formats logs into text

func NewTextFormatter

func NewTextFormatter() *TextFormatter

func (*TextFormatter) Colors

func (f *TextFormatter) Colors(enable bool)

func (*TextFormatter) DisableTimeStamp

func (f *TextFormatter) DisableTimeStamp()

func (*TextFormatter) EnableTimeStamp

func (f *TextFormatter) EnableTimeStamp()

func (*TextFormatter) Format

func (f *TextFormatter) Format(entry *log.LogMsg, disableColor bool) ([]byte, error)

Format renders a single log entry

func (*TextFormatter) Terminal

func (f *TextFormatter) Terminal(term bool)

Jump to

Keyboard shortcuts

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