diag

package
v0.0.0-...-904d98b Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 11 Imported by: 3

Documentation

Overview

diagnostics + logging

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bug

func Bug(format string, args ...interface{})

func Fatal

func Fatal(format string, args ...interface{})

func Init

func Init(prog string)

func Problem

func Problem(format string, args ...interface{})

func SetConfig

func SetConfig(cf *Config)

func SetDebugAll

func SetDebugAll(x bool)

func SetStderr

func SetStderr(x bool)

func Verbose

func Verbose(format string, args ...interface{})

Types

type Config

type Config struct {
	Mailto        string
	Mailfrom      string
	MailRateLimit time.Duration
	Facility      string
	Debug         map[string]bool
}

type Diag

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

func Logger

func Logger(sect string) *Diag

func (*Diag) Bug

func (d *Diag) Bug(format string, args ...interface{})

func (*Diag) Debug

func (d *Diag) Debug(format string, args ...interface{})

func (*Diag) Fatal

func (d *Diag) Fatal(format string, args ...interface{})

func (*Diag) Logger

func (d *Diag) Logger(sect string) *Diag

func (*Diag) Problem

func (d *Diag) Problem(format string, args ...interface{})

func (*Diag) Verbose

func (d *Diag) Verbose(format string, args ...interface{})

func (*Diag) WithMailFrom

func (d *Diag) WithMailFrom(e string) *Diag

func (*Diag) WithMailTo

func (d *Diag) WithMailTo(e string) *Diag

Jump to

Keyboard shortcuts

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