mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
log.Base had one implementation, the chromium file specs took a dir they never read, and emit was written three times; varnamelen now lets db, fd, and n stay short as Go readers expect.
25 lines
461 B
Go
25 lines
461 B
Go
package log
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
var defaultLogger = newLogger(os.Stderr)
|
|
|
|
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...))
|
|
}
|