feat: better structured internal

This commit is contained in:
2025-12-25 17:21:16 -05:00
parent d9deee0734
commit 3351eaddfc
8 changed files with 102 additions and 31 deletions

View File

@@ -0,0 +1,22 @@
package config
import (
"log/slog"
"os"
)
// Define the correct logger for the program to use.
func (this Config) GetLogger() *slog.Logger {
var level slog.Level
if this.Verbose {
level = slog.LevelInfo
} else {
level = slog.LevelError
}
return slog.New(
slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: level,
}),
)
}