This commit is contained in:
@@ -26,6 +26,8 @@ type Config struct {
|
||||
GinMode string
|
||||
LogLevel string
|
||||
Debug bool
|
||||
LogDir string
|
||||
LogVolume string
|
||||
}
|
||||
|
||||
// LoadConfig loads configuration with proper environment file precedence
|
||||
@@ -46,6 +48,8 @@ func LoadConfig() *Config {
|
||||
GinMode: getGinMode(env),
|
||||
LogLevel: getLogLevel(env),
|
||||
Debug: env == Development,
|
||||
LogDir: getEnv("LOG_DIR", "/app/logs"),
|
||||
LogVolume: getEnv("LOG_VOLUME", "counter_logs"),
|
||||
}
|
||||
|
||||
// Log configuration (without sensitive data)
|
||||
@@ -183,6 +187,8 @@ func logConfig(config *Config) {
|
||||
log.Printf("║ 📊 LOG LEVEL: %-15s ║", config.LogLevel)
|
||||
log.Printf("║ 🌐 PORT: %-20s ║", config.Port)
|
||||
log.Printf("║ 📈 METRICS PORT: %-15s ║", config.MetricsPort)
|
||||
log.Printf("║ 📝 LOG DIR: %-20s ║", config.LogDir)
|
||||
log.Printf("║ 📦 LOG VOLUME: %-18s ║", config.LogVolume)
|
||||
log.Printf("║ ║")
|
||||
log.Printf("║ 📁 Configuration Files Loaded: ║")
|
||||
log.Printf("║ • .env (base configuration) ║")
|
||||
|
||||
Reference in New Issue
Block a user