Skip to content

Commit

Permalink
log: m godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Nov 16, 2024
1 parent 37c9abc commit 9c86b98
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion intra/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,39 +93,50 @@ func Of(tag string, l LogFn2) LogFn {
return N
}

func N(string, ...any) {}
// N is a no-op logger.
func N(string, ...any) {}

// N2 is a no-op logger.
func N2(int, string, ...any) {}

// V logs a verbose message.
func V(msg string, args ...any) {
V2(LogFnCallerDepth, msg, args...)
}

// VV logs a very verbose message.
func VV(msg string, args ...any) {
VV2(LogFnCallerDepth, msg, args...)
}

// D logs a debug message.
func D(msg string, args ...any) {
D2(LogFnCallerDepth, msg, args...)
}

// I logs an info message.
func I(msg string, args ...any) {
I2(LogFnCallerDepth, msg, args...)
}

// W logs a warning message.
func W(msg string, args ...any) {
W2(LogFnCallerDepth, msg, args...)
}

// E logs an error message.
func E(msg string, args ...any) {
E2(LogFnCallerDepth, msg, args...)
}

// P logs a private message.
func P(msg string, args ...any) {
if Glogger != nil {
Glogger.Piif(CallerDepth, "P "+msg, args...)
}
}

// Wtf logs a fatal message.
func Wtf(msg string, args ...any) {
if Glogger != nil {
Glogger.Fatalf(CallerDepth, "F "+msg, args...)
Expand All @@ -141,6 +152,7 @@ func C(msg string, scratch []byte) {
}
}

// U logs a user message (notifies the user).
func U(msg string) {
if Glogger != nil {
Glogger.Usr(msg)
Expand All @@ -159,6 +171,7 @@ func T(msg string, args ...any) {
}
}

// TALL logs the stack trace of all active goroutines.
func TALL(msg string, scratch64k []byte) {
if Glogger != nil {
E2(LogFnCallerDepth, "----START----")
Expand Down

0 comments on commit 9c86b98

Please sign in to comment.