This commit is contained in:
antanst
2025-10-14 16:58:38 +03:00
parent d336bdffba
commit 0e218cb57b
6 changed files with 216 additions and 24 deletions

View File

@@ -6,8 +6,6 @@ import (
"os"
"path/filepath"
"gemserve/config"
"github.com/lmittmann/tint"
)
@@ -36,8 +34,8 @@ func FromContext(ctx context.Context) *slog.Logger {
return slog.Default()
}
func SetupLogging() {
programLevel.Set(config.CONFIG.LogLevel)
func SetupLogging(logLevel slog.Level) {
programLevel.Set(logLevel)
// With coloring (uses external package)
opts := &tint.Options{
AddSource: true,