Documentation
¶
Index ¶
- func CaptureMode(w io.Writer)
- func DaemonMode(b bool)
- func DaemonShow() bool
- func Error(err error, a ...any)
- func Exit(a ...any)
- func Fatal(s string, a ...any)
- func Fatalf(s string, a ...any)
- func Fatalln(a ...any)
- func HttpMode(w http.ResponseWriter)
- func Info(a ...any)
- func Infof(s string, a ...any)
- func Log(f *LogFlag, a ...any)
- func Logf(f *LogFlag, s string, a ...any)
- func Printf(s string, a ...any)
- func Println(a ...any)
- func ProcessFlags(callback func(*LogFlag))
- func SetAll(b bool)
- func SetDefaults()
- func SetTmpOLD()
- func Sleep(a ...any)
- func Sprint(a ...any) string
- func Sprintf(s string, a ...any) string
- func Sprintln(a ...any) string
- func Timestamps(b bool)
- func UnsetTmp()
- func Verbose(a ...any)
- func Warn(a ...any)
- type LogFlag
- func (f *LogFlag) Disabled() bool
- func (f *LogFlag) Enabled() bool
- func (f *LogFlag) GetDefault() bool
- func (f *LogFlag) GetDesc() string
- func (f *LogFlag) GetName() string
- func (f *LogFlag) GetSubsystem() string
- func (f *LogFlag) Ok() bool
- func (f *LogFlag) SetBool(b bool)
- func (f *LogFlag) SetDefault()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureMode ¶ added in v0.22.5
func DaemonMode ¶ added in v0.22.1
func DaemonMode(b bool)
func DaemonShow ¶ added in v0.22.1
func DaemonShow() bool
func Exit ¶
func Exit(a ...any)
exit() # yep. exits. I guess everything must be fine exit(3) # I guess 3 it is then exit("dont like apples") # ok. I'll make a note of that
func HttpMode ¶ added in v0.22.2
func HttpMode(w http.ResponseWriter)
func Sleep ¶
func Sleep(a ...any)
sleep() # you know what this does? sleeps for 1 second. yep. dump. easy. sleep(.1) # you know what this does? yes, it sleeps for 1/10th of a second
func Timestamps ¶ added in v0.22.10
func Timestamps(b bool)
Types ¶
type LogFlag ¶
type LogFlag struct {
// contains filtered or unexported fields
}
var ERROR *LogFlag // toggles log.Warn() (true by default)
var INFO *LogFlag // toggles log.Info()
var PRINTLN *LogFlag // toggles log.Println() (true by default)
var SPEW *LogFlag // toggles log.Spew()
var VERBOSE *LogFlag // toggles log.Verbose()
var WARN *LogFlag // toggles log.Warn() (true by default)
func ShowFlags ¶
func ShowFlags() []*LogFlag
this bypasses all checks and _always_ logs the info to STDOUT is this a bad idea? Probably not.... TODO: returning []*LogFlag is not safe and access must be locked but this is only used by the log debugging window at this time
func (*LogFlag) Disabled ¶ added in v0.22.11
is the output flag disabled? if so, don't print anything!
func (*LogFlag) Enabled ¶ added in v0.22.11
just the opposite of Disabled() both are here just for code readability
func (*LogFlag) GetDefault ¶ added in v0.5.6
returns the description of the flag
func (*LogFlag) GetSubsystem ¶
returns the subsystem of the flag