tailscale/feature/condregister
Brad Fitzpatrick 0433cc6929 feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag
Add a new modular syslog feature providing a tailscaled --syslog flag
that sends the daemon's logs to the system syslog daemon instead of
stderr, which is useful when running as a daemon without a service
manager that captures stderr (e.g. OpenWrt's procd).

The feature package registers two new hooks: one to register its flag
before flag parsing, and one that tailscaled calls early in main to
redirect the standard library's default logger. Because logpolicy later
points the default logger at logtail, whose local console copy writes
to stderr, logpolicy now also consults the hook and sends its console
copy to the same sink (with timestamps disabled, as syslog records its
own).

The feature is linked by default only on Linux, FreeBSD, and OpenBSD,
and can be removed with the ts_omit_syslog build tag. If connecting to
the syslog daemon fails at startup, tailscaled logs a warning and
continues logging to stderr.

Fixes #16270

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I8f3a92d4c1e6b70a5d29e4f61b3c874250a9de13
2026-07-17 13:55:23 -07:00
..
awsparamstore cmd/tailscale/cli: allow fetching keys from AWS Parameter Store 2026-01-29 18:09:56 -05:00
identityfederation all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netlog wgengine,wgcfg,feature/netlog: move network flow logging behind a feature hook 2026-07-09 12:56:37 -07:00
oauthkey all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
portmapper all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
useproxy all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
condregister.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_ace.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_acme.go feature/acme, ipn/ipnlocal: start moving ACME/cert state into an extension 2026-06-26 09:48:24 -07:00
maybe_appconnectors.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_bird.go wgengine,cmd/tailscaled,feature/bird: move BIRD integration to ./feature 2026-07-14 10:48:09 -07:00
maybe_c2n.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_captiveportal.go feature/captiveportal: move captive portal code out of ipnlocal, netcheck 2026-07-14 20:22:23 -04:00
maybe_capture.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_clientupdate.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_conn25.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_debugportmapper.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_desktop_sessions.go ipn/desktop: move behind feature/condregister 2026-04-07 11:37:47 -07:00
maybe_doctor.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_drive.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_linkspeed.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_linuxdnsfight.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_netlog.go wgengine,wgcfg,feature/netlog: move network flow logging behind a feature hook 2026-07-09 12:56:37 -07:00
maybe_osrouter.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_portlist.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_posture.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_relayserver.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_remoteconfig.go cmd/tailscale, ipn, feature/remoteconfig: add remote-config support 2026-07-07 12:10:34 -07:00
maybe_routecheck.go feature/routecheck: add ts_omit_routecheck feature flag (#19638) 2026-05-15 15:50:50 -07:00
maybe_runtimemetrics.go control/controlknobs,feature/*,ipn/ipnlocal,tailcfg: add runtimemetrics 2026-05-26 16:02:01 -07:00
maybe_sdnotify.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_store_aws.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_store_kube.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_syslog.go feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag 2026-07-17 13:55:23 -07:00
maybe_syspolicy.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_taildrop.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_tailnetlock.go ipn/ipnlocal,tailcfg: add /debug/tka c2n endpoint (#19198) 2026-04-20 16:00:03 +01:00
maybe_tap.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_tpm.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
maybe_tundevstats.go feature/*,net/tstun: add tundev_txq_drops clientmetric on Linux 2026-03-24 09:44:58 -07:00
maybe_wakeonlan.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00