Files
HackBrowserData/internal/log/level.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

31 lines
609 B
Go

package log
// Level defines all the available levels we can log at.
type Level int32
const (
// DebugLevel is the lowest level of logging.
// Debug logs are intended for debugging and development purposes.
DebugLevel Level = iota + 1
// InfoLevel is used for user-facing progress and status messages.
InfoLevel
// WarnLevel is used for undesired but relatively expected events,
// which may indicate a problem.
WarnLevel
)
func (l Level) String() string {
switch l {
case DebugLevel:
return "DBG"
case InfoLevel:
return "INF"
case WarnLevel:
return "WRN"
default:
return "???"
}
}