log

package
v0.0.0-...-78c2119 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller

func Caller(skip int) (file string, line int)

Caller caches the result for runtime.Caller(). Inspired by https://zhuanlan.zhihu.com/p/403417640

func Debug

func Debug(message string, args ...any)

func Error

func Error(message string, args ...any)

func Fatal

func Fatal(message string, args ...any)

func Info

func Info(message string, args ...any)

func Log

func Log(level LogLevel, file string, line int, message string, args ...any)

func SetLevel

func SetLevel(l LogLevel)

func Trace

func Trace(message string, args ...any)

func Warn

func Warn(message string, args ...any)

Types

type LogLevel

type LogLevel int
const (
	LogFatal LogLevel = 1
	LogError LogLevel = 2
	LogWarn  LogLevel = 3
	LogInfo  LogLevel = 4
	LogDebug LogLevel = 5
	LogTrace LogLevel = 6
)

Jump to

Keyboard shortcuts

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