logging

package module
v0.0.0-...-08a15a4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	NOTSET int = iota
	ERROR
	WARN
	INFO
	DEBUG
	DEBUGEXT
	TRACE

	SKIP int = 99
)

Variables

View Source
var (
	LOGLEVELS = map[string]int{
		"notset":   NOTSET,
		"error":    ERROR,
		"warn":     WARN,
		"info":     INFO,
		"debug":    DEBUG,
		"debugext": DEBUGEXT,
		"trace":    TRACE,
		"skip":     SKIP,
	}
)

Functions

func Alert

func Alert(self *TlogAlert)

func Alert(e error, level string, msg *string) {

func GetFd

func GetFd() *os.File

func GetLogLevel

func GetLogLevel() string

func GetVerbose

func GetVerbose() bool

func New

func New(self *TlogInit)

func Set

func Set(self Settinger)

Types

type Settinger

type Settinger interface {
	// contains filtered or unexported methods
}

type Tfile

type Tfile os.File

type TlogAlert

type TlogAlert struct {
	Err   error
	Level string
	Msg   string
}

type TlogDist

type TlogDist struct {
	Term, File *log.Logger
}

type TlogInit

type TlogInit struct {
	Verbose  bool
	LogLevel string
	Fd       *os.File
}

type TlogLevel

type TlogLevel string

type TlogShell

type TlogShell struct {
	Shell   string
	TTYsize TttySize
}

func (*TlogShell) Dialog

func (self *TlogShell) Dialog(command, backTitle, title, textBox *string, typeBox string) error

func (*TlogShell) DialogCheckList

func (self *TlogShell) DialogCheckList(backTitle, title, textBox, extField *string) (*string, error)

func (*TlogShell) DialogExec

func (self *TlogShell) DialogExec(command, backTitle, textBox *string) error

func (*TlogShell) DialogInfo

func (self *TlogShell) DialogInfo(backTitle, title, textBox *string) error

func (*TlogShell) DialogInputBox

func (self *TlogShell) DialogInputBox(backTitle, title, textBox, extField *string) (*string, error)

func (*TlogShell) DialogMsgBox

func (self *TlogShell) DialogMsgBox(backTitle, title, textBox *string) error

func (*TlogShell) DialogYesNo

func (self *TlogShell) DialogYesNo(backTitle, textBox *string) error

func (*TlogShell) ShellExec

func (self *TlogShell) ShellExec(command *string) (*string, error)

type TttySize

type TttySize struct {
	X, Y int
}

type Tverbose

type Tverbose bool

Jump to

Keyboard shortcuts

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