Adjust variable naming

This commit is contained in:
Andrew-71 2024-10-13 17:18:53 +03:00
parent c3334faa9e
commit 78056d8b48
10 changed files with 45 additions and 41 deletions

View file

@ -10,8 +10,8 @@ import (
"github.com/go-chi/chi/middleware"
)
// LogInit makes slog output to both os.Stdout and a file if needed, and sets slog.LevelDebug if enabled.
func LogInit(debugMode bool) {
// Load makes slog output to both os.Stdout and a file if needed, and sets slog.LevelDebug if enabled.
func Load(debugMode bool) {
var w io.Writer
if config.Cfg.LogToFile {
f, err := os.OpenFile(config.Cfg.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)