main.go's config-load failure path silently os.Exit(1)s, which means lumberjack's file-rotation buffer never flushes before exit and the journal only sees \"started → exited 1\" with zero diagnostic. Last deploy run's app log had only the \"Logger initialized\" line; the actual NewConfig error never made it to disk because os.Exit doesn't run defers. A plain fmt.Fprintf to stderr → goes to systemd journal synchronously → the next probe rescue dump will show what's actually failing. The original \"don't write to stderr to avoid broken pipe with journald\" comment cited a concern that doesn't apply at this point in startup: there's no parent to break the pipe to, and journald accepts arbitrary bytes on stderr. Keep the os.Exit but print first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| admin | ||
| analytics | ||
| auth | ||
| collaboration | ||
| connecterrors | ||
| discover | ||
| distribution | ||
| education | ||
| feed | ||
| marketplace | ||
| moderation | ||
| social | ||
| subscription | ||
| track | ||