package logging import ( "encoding/json" "log" "synlotto-website/models" ) func LogConfig(config *models.Config) { safeConfig := *config safeConfig.CSRF.CSRFKey = "[REDACTED]" safeConfig.Session.SessionAuthKey = "[REDACTED]" safeConfig.Session.SessionEncryptionKey = "[REDACTED]" cfg, err := json.MarshalIndent(safeConfig, "", " ") if err != nil { log.Println("Failed to log config:", err) return } log.Println("App starting with config:") log.Println(string(cfg)) }