-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔇 silent changes: update loggy codebase #2
- Loading branch information
1 parent
302acf8
commit fc6e620
Showing
3 changed files
with
443 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:"}), | ||
) |
Oops, something went wrong.