Skip to content

Commit

Permalink
🔇 silent changes: update loggy codebase #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Feb 5, 2025
1 parent 302acf8 commit fc6e620
Show file tree
Hide file tree
Showing 3 changed files with 443 additions and 0 deletions.
36 changes: 36 additions & 0 deletions const.go
Original file line number Diff line number Diff line change
@@ -1 +1,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:"}),
)
Loading

0 comments on commit fc6e620

Please sign in to comment.