feat: statistics flag, commented some more
This commit is contained in:
@@ -5,13 +5,14 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// Define the correct logger for the program to use.
|
||||
// Returns a structured logger with the appropriate configurations.
|
||||
func (c Config) GetLogger() *slog.Logger {
|
||||
var level slog.Level
|
||||
// By default, only print out errors.
|
||||
level := slog.LevelError
|
||||
|
||||
// If the user set the output to be "VERBOSE", return the debug logs.
|
||||
if c.Verbose {
|
||||
level = slog.LevelInfo
|
||||
} else {
|
||||
level = slog.LevelError
|
||||
}
|
||||
|
||||
return slog.New(
|
||||
|
||||
Reference in New Issue
Block a user