style: remove emojis from log messages
Replaced emoji icons with plain text for cleaner logs and cross-platform compatibility.
This commit is contained in:
parent
0f67fb526a
commit
63b1e32fd1
4 changed files with 7 additions and 7 deletions
|
|
@ -1087,7 +1087,7 @@ func Load() (*Config, error) {
|
||||||
if demoModeEnv != "" {
|
if demoModeEnv != "" {
|
||||||
cfg.DemoMode = demoModeEnv == "true" || demoModeEnv == "1"
|
cfg.DemoMode = demoModeEnv == "true" || demoModeEnv == "1"
|
||||||
if cfg.DemoMode {
|
if cfg.DemoMode {
|
||||||
log.Warn().Msg("🎭 DEMO MODE - All modifications disabled (read-only)")
|
log.Warn().Msg("DEMO MODE - All modifications disabled (read-only)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1036,7 +1036,7 @@ func (c *ConfigPersistence) LoadNodesConfig() (*NodesConfig, error) {
|
||||||
log.Error().
|
log.Error().
|
||||||
Str("corruptedFile", c.nodesFile).
|
Str("corruptedFile", c.nodesFile).
|
||||||
Str("backupFile", backupFile).
|
Str("backupFile", backupFile).
|
||||||
Msg("⚠️ CRITICAL: Both nodes.enc and backup are corrupted/unreadable. Encryption key may have been regenerated. Manual recovery required. Starting with empty config.")
|
Msg("CRITICAL: Both nodes.enc and backup are corrupted/unreadable. Encryption key may have been regenerated. Manual recovery required. Starting with empty config.")
|
||||||
|
|
||||||
// Move corrupted file with timestamp for forensics
|
// Move corrupted file with timestamp for forensics
|
||||||
corruptedFile := fmt.Sprintf("%s.corrupted-%s", c.nodesFile, time.Now().Format("20060102-150405"))
|
corruptedFile := fmt.Sprintf("%s.corrupted-%s", c.nodesFile, time.Now().Format("20060102-150405"))
|
||||||
|
|
@ -1058,7 +1058,7 @@ func (c *ConfigPersistence) LoadNodesConfig() (*NodesConfig, error) {
|
||||||
// CRITICAL: Don't delete the corrupted file - leave it for manual recovery
|
// CRITICAL: Don't delete the corrupted file - leave it for manual recovery
|
||||||
log.Error().
|
log.Error().
|
||||||
Str("corruptedFile", c.nodesFile).
|
Str("corruptedFile", c.nodesFile).
|
||||||
Msg("⚠️ CRITICAL: nodes.enc is corrupted and no backup exists. Encryption key may have been regenerated. Manual recovery required. Starting with empty config.")
|
Msg("CRITICAL: nodes.enc is corrupted and no backup exists. Encryption key may have been regenerated. Manual recovery required. Starting with empty config.")
|
||||||
|
|
||||||
// Move corrupted file with timestamp for forensics
|
// Move corrupted file with timestamp for forensics
|
||||||
corruptedFile := fmt.Sprintf("%s.corrupted-%s", c.nodesFile, time.Now().Format("20060102-150405"))
|
corruptedFile := fmt.Sprintf("%s.corrupted-%s", c.nodesFile, time.Now().Format("20060102-150405"))
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ func getOrCreateKeyAt(dataDir string) ([]byte, error) {
|
||||||
log.Error().
|
log.Error().
|
||||||
Strs("foundFiles", foundFiles).
|
Strs("foundFiles", foundFiles).
|
||||||
Str("dataDir", dataDir).
|
Str("dataDir", dataDir).
|
||||||
Msg("⚠️ CRITICAL: Encryption key not found but encrypted/backup/corrupted files exist")
|
Msg("CRITICAL: Encryption key not found but encrypted/backup/corrupted files exist")
|
||||||
return nil, fmt.Errorf("encryption key not found but encrypted data exists (%v) - cannot generate new key as it would orphan existing data. Please restore the encryption key from backup or delete ALL .enc* files to start fresh", foundFiles)
|
return nil, fmt.Errorf("encryption key not found but encrypted data exists (%v) - cannot generate new key as it would orphan existing data. Please restore the encryption key from backup or delete ALL .enc* files to start fresh", foundFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1610,7 +1610,7 @@ func (n *NotificationManager) sendGroupedWebhook(webhook WebhookConfig, alertLis
|
||||||
if len(otherAlerts) > 0 {
|
if len(otherAlerts) > 0 {
|
||||||
// For custom templates, we need to escape newlines since they're likely
|
// For custom templates, we need to escape newlines since they're likely
|
||||||
// used in shell commands or other contexts that need escaping
|
// used in shell commands or other contexts that need escaping
|
||||||
alert.Message = fmt.Sprintf("%s\\n\\n🔔 All %d alerts:\\n%s", summary, len(alertList), strings.Join(otherAlerts, "\\n"))
|
alert.Message = fmt.Sprintf("%s\\n\\nAll %d alerts:\\n%s", summary, len(alertList), strings.Join(otherAlerts, "\\n"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1670,10 +1670,10 @@ func (n *NotificationManager) sendGroupedWebhook(webhook WebhookConfig, alertLis
|
||||||
// Discord embeds don't render \n in description anyway
|
// Discord embeds don't render \n in description anyway
|
||||||
if webhook.Service == "discord" {
|
if webhook.Service == "discord" {
|
||||||
// Use comma-separated list for Discord
|
// Use comma-separated list for Discord
|
||||||
alert.Message = fmt.Sprintf("%s | 🔔 %d alerts: %s", summary, len(alertList), strings.Join(otherAlerts, ", "))
|
alert.Message = fmt.Sprintf("%s | %d alerts: %s", summary, len(alertList), strings.Join(otherAlerts, ", "))
|
||||||
} else {
|
} else {
|
||||||
// For other services, escape newlines properly
|
// For other services, escape newlines properly
|
||||||
alert.Message = fmt.Sprintf("%s\\n\\n🔔 All %d alerts:\\n%s", summary, len(alertList), strings.Join(otherAlerts, "\\n"))
|
alert.Message = fmt.Sprintf("%s\\n\\nAll %d alerts:\\n%s", summary, len(alertList), strings.Join(otherAlerts, "\\n"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue