Moved package log to logging

This commit is contained in:
bwilliams committed 2026-10-09 09:30:02 +01:00
1 parent da81e6ccd9
commit dd26976f76
3 files changed
+13 -11

No files matched your search

+6 -6
View File
@@ -20,7 +20,7 @@ import (
"log/slog"
"git.avsdev.uk/Go/job-search/internal/config"
"git.avsdev.uk/Go/job-search/internal/log"
"git.avsdev.uk/Go/job-search/internal/logging"
"github.com/spf13/cobra"
)
@@ -66,8 +66,8 @@ func (o *Options) RunSetup(
}
// Change logging level based off newly loaded config
if conf.Logging.LogLevel() <= slog.LevelDebug && !log.IsDebugEnabled() {
log.EnableDebug()
if conf.Logging.LogLevel() <= slog.LevelDebug && !logging.IsDebugEnabled() {
logging.EnableDebug()
}
// Check if the logging should be switched to file
@@ -75,7 +75,7 @@ func (o *Options) RunSetup(
if len(conf.Logging.File) == 0 {
slog.Warn("No log file configured, remaining in console logging mode!")
} else {
log.LogToFile(conf.Logging.File)
logging.LogToFile(conf.Logging.File)
}
}
}
@@ -85,8 +85,8 @@ func (o *Options) RunSetup(
// Finish shuts down any open file logger
func (o *Options) Finish() error {
if log.IsFileLogger() {
log.Shutdown()
if logging.IsFileLogger() {
logging.Shutdown()
}
return nil