-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.go
37 lines (29 loc) · 1.01 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package loggy
import (
"os"
"path/filepath"
)
// Predefined severity levels for logging.
const (
// DebugIssuer represents debug-level messages for development diagnostics
DebugIssuer Severity = iota
// InfoIssuer indicates normal operational messages for tracking progress
InfoIssuer
// WarnIssuer signifies potential issues that don't disrupt core functionality
WarnIssuer
// ErrorIssuer denotes failures in specific operations or components
ErrorIssuer
// FatalIssuer represents critical errors leading to application termination
FatalIssuer
// DisableIssuer is a special level that disables all logging
DisableIssuer
)
// Default is a pre-configured Logger instance intended for general use.
// It is configured with the current executable's base name as the logger name,
// outputs to os.Stdout, and is set to log messages at the Debug level.
var Default = New(
": "+filepath.Base(os.Args[0])+":",
os.Stdout,
DebugIssuer,
WithSeverityNames([]string{"debug:", "info:", "warn:", "error:", "fatal:"}),
)