log

package
v0.0.0-...-a727419 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NInfo = iota
	NError
	NFatal
)

Variables

View Source
var (
	GetStackTrace = func() string {
		pc, fn, line, _ := runtime.Caller(1)
		stackTrace := fmt.Sprintf("%s[%s:%d]", runtime.FuncForPC(pc).Name(), fn, line)

		return stackTrace
	}

	GetExplicitTime = func() string {
		return time.Now().Format("01-02-2006 15:04:05")
	}
)

Functions

func AppendLine

func AppendLine(filepath string, s string, m *sync.Mutex) error

func Error

func Error(stack string, format string, content ...any)

func Fatal

func Fatal(stack string, format string, content ...any)

func Info

func Info(format string, content ...any)

When verbose is false, this function is a noop

func LogMessages

func LogMessages[T constraints.Integer, S comparable](level T, message S, stackTrace string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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