tailscale/feature/buildfeatures
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
..
buildfeatures.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_ace_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_ace_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_acme_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_acme_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_advertiseexitnode_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_advertiseexitnode_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_advertiseroutes_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_advertiseroutes_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_appconnectors_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_appconnectors_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_aws_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_aws_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_bakedroots_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_bakedroots_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_bird_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_bird_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_c2n_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_c2n_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cachenetmap_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cachenetmap_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_captiveportal_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_captiveportal_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_capture_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_capture_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cliconndiag_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cliconndiag_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_clientmetrics_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_clientmetrics_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_clientupdate_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_clientupdate_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cloud_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_cloud_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_colorable_disabled.go cmd/tailscale,feature/featuretags: make webbrowser and colorable deps omittable 2026-02-08 10:04:04 -08:00
feature_colorable_enabled.go cmd/tailscale,feature/featuretags: make webbrowser and colorable deps omittable 2026-02-08 10:04:04 -08:00
feature_completion_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_completion_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_completion_scripts_disabled.go feature/featuretags: add test that all ts_omit_foo tags are declared 2026-02-04 13:15:41 -08:00
feature_completion_scripts_enabled.go feature/featuretags: add test that all ts_omit_foo tags are declared 2026-02-04 13:15:41 -08:00
feature_conn25_disabled.go cmd/tailscaled,feature/conn25,feature/featuretags: add conn25 to featuretags 2026-02-04 12:52:08 -08:00
feature_conn25_enabled.go cmd/tailscaled,feature/conn25,feature/featuretags: add conn25 to featuretags 2026-02-04 12:52:08 -08:00
feature_dbus_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_dbus_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debug_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debug_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debugeventbus_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debugeventbus_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debugportmapper_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_debugportmapper_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_desktop_sessions_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_desktop_sessions_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_dns_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_dns_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_doctor_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_doctor_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_drive_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_drive_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_flashappliance_disabled.go cmd/tailscale: add 'configure pve-appliance' to make Proxmox VM of appliance 2026-07-07 13:12:13 -07:00
feature_flashappliance_enabled.go cmd/tailscale: add 'configure pve-appliance' to make Proxmox VM of appliance 2026-07-07 13:12:13 -07:00
feature_gro_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_gro_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_health_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_health_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_hujsonconf_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_hujsonconf_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_identityfederation_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_identityfederation_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_ipnbus_disabled.go ipn/localapi, cli, clientmetric: add ipnbus feature tag; fix omit.go stub 2026-04-07 10:22:37 -07:00
feature_ipnbus_enabled.go ipn/localapi, cli, clientmetric: add ipnbus feature tag; fix omit.go stub 2026-04-07 10:22:37 -07:00
feature_iptables_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_iptables_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_kube_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_kube_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_linkspeed_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_linkspeed_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_linuxdnsfight_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_linuxdnsfight_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_listenrawdisco_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_listenrawdisco_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_logtail_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_logtail_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_netlog_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_netlog_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_netstack_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_netstack_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_networkmanager_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_networkmanager_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_oauthkey_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_oauthkey_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_osrouter_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_osrouter_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_outboundproxy_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_outboundproxy_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_peerapiclient_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_peerapiclient_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_peerapiserver_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_peerapiserver_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_portlist_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_portlist_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_portmapper_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_portmapper_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_posture_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_posture_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_qrcodes_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_qrcodes_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_relayserver_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_relayserver_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_remoteconfig_disabled.go cmd/tailscale, ipn, feature/remoteconfig: add remote-config support 2026-07-07 12:10:34 -07:00
feature_remoteconfig_enabled.go cmd/tailscale, ipn, feature/remoteconfig: add remote-config support 2026-07-07 12:10:34 -07:00
feature_resolved_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_resolved_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_routecheck_disabled.go feature/routecheck: add ts_omit_routecheck feature flag (#19638) 2026-05-15 15:50:50 -07:00
feature_routecheck_enabled.go feature/routecheck: add ts_omit_routecheck feature flag (#19638) 2026-05-15 15:50:50 -07:00
feature_runtimemetrics_disabled.go control/controlknobs,feature/*,ipn/ipnlocal,tailcfg: add runtimemetrics 2026-05-26 16:02:01 -07:00
feature_runtimemetrics_enabled.go control/controlknobs,feature/*,ipn/ipnlocal,tailcfg: add runtimemetrics 2026-05-26 16:02:01 -07:00
feature_sdnotify_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_sdnotify_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_serve_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_serve_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_ssh_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_ssh_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_synology_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_synology_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_syslog_disabled.go feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag 2026-07-17 13:55:23 -07:00
feature_syslog_enabled.go feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag 2026-07-17 13:55:23 -07:00
feature_syspolicy_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_syspolicy_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_systray_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_systray_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_taildrop_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_taildrop_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tailnetlock_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tailnetlock_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tap_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tap_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tpm_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tpm_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_tundevstats_disabled.go feature/*,net/tstun: add tundev_txq_drops clientmetric on Linux 2026-03-24 09:44:58 -07:00
feature_tundevstats_enabled.go feature/*,net/tstun: add tundev_txq_drops clientmetric on Linux 2026-03-24 09:44:58 -07:00
feature_unixsocketidentity_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_unixsocketidentity_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useexitnode_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useexitnode_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useproxy_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useproxy_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_usermetrics_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_usermetrics_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useroutes_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_useroutes_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_wakeonlan_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_wakeonlan_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_webbrowser_disabled.go cmd/tailscale,feature/featuretags: make webbrowser and colorable deps omittable 2026-02-08 10:04:04 -08:00
feature_webbrowser_enabled.go cmd/tailscale,feature/featuretags: make webbrowser and colorable deps omittable 2026-02-08 10:04:04 -08:00
feature_webclient_disabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
feature_webclient_enabled.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
gen.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00