Documentation ¶
Overview ¶
diagnostics + logging
Index ¶
- func Bug(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func Problem(format string, args ...interface{})
- func SetConfig(cf Config)
- func SetDebugFlag(f string, v bool)
- func Verbose(format string, args ...interface{})
- type Config
- type Diag
- func (d *Diag) Bug(format string, args ...interface{})
- func (d *Diag) Debug(format string, args ...interface{})
- func (d *Diag) Fatal(format string, args ...interface{})
- func (d *Diag) Logger(sect string) *Diag
- func (d *Diag) Problem(format string, args ...interface{})
- func (d *Diag) SetDebugAll(x bool)
- func (d *Diag) SetStderr(x bool)
- func (d *Diag) Verbose(format string, args ...interface{})
- func (d *Diag) WithMailFrom(e string) *Diag
- func (d *Diag) WithMailTo(e string) *Diag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fatal ¶
func Fatal(format string, args ...interface{})
Fatal logs a message at high priority + terminates the program
func Problem ¶
func Problem(format string, args ...interface{})
Problem logs a message indicating a problem
func SetDebugFlag ¶
SetDebugFlag enables/disables debug logging for a specified section
Types ¶
type Config ¶
type Config struct { MailTo string MailFrom string MailRateLimit time.Duration Sendmail string Facility string ProgName string Debug map[string]bool }
Config configures the loggger
type Diag ¶
type Diag struct {
// contains filtered or unexported fields
}
func (*Diag) WithMailFrom ¶
WithMailFrom changes the mail sender
func (*Diag) WithMailTo ¶
WithMailTo changes the mail destination
Click to show internal directories.
Click to hide internal directories.