Files
HackBrowserData/internal/log/log.go
T
Roger 4e98ba7884 fix: report unreadable sources and tidy the pipeline (#675)
A Stat error other than not-exist was reported as absent, and the --zip archive was readable by other users.
The rest is review follow-up: export no longer prints, one runner type, shared name helpers, a trimmed log API.
2026-11-01 23:42:13 +08:00

24 lines
581 B
Go

package log
import "fmt"
// defaultLogger is the default logger used by the package-level functions.
var defaultLogger = NewLogger(nil)
// SetVerbose lowers the package-level logger to DebugLevel.
func SetVerbose() {
defaultLogger.SetLevel(DebugLevel)
}
func Debugf(format string, args ...any) {
defaultLogger.logMsg(DebugLevel, fmt.Sprintf(format, args...))
}
func Infof(format string, args ...any) {
defaultLogger.logMsg(InfoLevel, fmt.Sprintf(format, args...))
}
func Warnf(format string, args ...any) {
defaultLogger.logMsg(WarnLevel, fmt.Sprintf(format, args...))
}