log

package
v0.0.0-...-5d6d785 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dir      = os.Getenv("HOME") + "/.pty/log"
	Duration = time.Hour
	Age      = time.Hour * 6
)

Functions

func CleanStack

func CleanStack(buf []byte) []byte

CleanStack prunes the stack to only include local frames.

func DepthErrorf

func DepthErrorf(depth int, format string, v ...interface{})

func DepthInfof

func DepthInfof(depth int, format string, v ...interface{})

func DepthWarnf

func DepthWarnf(depth int, format string, v ...interface{})

func DumpGoroutines

func DumpGoroutines()

func DumpStack

func DumpStack()

func Errorf

func Errorf(format string, v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func Init

func Init(path string) error

Init initializes the logging system.

func Me

func Me() string

Me returns the the function name of the deepest stack frame that is part of the pty program.

func Outputf

func Outputf(n int, p, format string, v ...interface{})

func TakeStderr

func TakeStderr()

func Warnf

func Warnf(format string, v ...interface{})

Types

type Logger

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

func NewLogger

func NewLogger(path string) (*Logger, error)

func Standard

func Standard() *Logger

func (*Logger) DumpGoroutines

func (log *Logger) DumpGoroutines()

func (*Logger) DumpStack

func (log *Logger) DumpStack()

func (*Logger) Errorf

func (log *Logger) Errorf(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Infof

func (log *Logger) Infof(format string, v ...interface{})

func (*Logger) Outputf

func (l *Logger) Outputf(depth int, prefix string, format string, v ...interface{})

func (*Logger) Warnf

func (log *Logger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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