Settings > Sources: turn syslog reception on/off, choose UDP/TCP
- SyslogServer opens and closes the UDP/TCP listeners at runtime from the configuration saved in /data/syslog.json; a busy port no longer stops Logstream, the error is shown in Settings instead. - Sources tab: syslog section with an on/off switch, UDP and TCP labels, the live listening state and the published port (SYSLOG_PORT, passed as SYSLOG_PUBLIC_PORT for display; the mapping stays in docker-compose). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7beb791e44
commit
32593b9515
9 files changed
+278
-28
No files matched your search
@@ -120,16 +120,15 @@ func main() {
|
||||
store.Enqueue(e)
|
||||
hub.Publish(e)
|
||||
}
|
||||
if err := StartSyslog(ctx, cfg.syslogAddr, sink); err != nil {
|
||||
log.Fatalf("syslog: %v", err)
|
||||
}
|
||||
// Listening errors (port already used…) are shown in Settings > Sources.
|
||||
syslogSrv := NewSyslogServer(ctx, cfg.syslogAddr, getenv("SYSLOG_PUBLIC_PORT", ""), cfg.dataDir, sink)
|
||||
|
||||
static, err := fs.Sub(webFS, "web")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
mux := http.NewServeMux()
|
||||
api := &API{store: store, hub: hub, tags: tags, rdns: rdns, allowPurge: cfg.allowPurge, exportMax: cfg.exportMax}
|
||||
api := &API{store: store, hub: hub, tags: tags, rdns: rdns, allowPurge: cfg.allowPurge, exportMax: cfg.exportMax, syslog: syslogSrv}
|
||||
if cfg.dockerLogs {
|
||||
dm, err := NewDockerManager(cfg.dockerHost, cfg.dataDir, cfg.backfill, sink)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user