tailscale / tailscale

The easiest, most secure way to use WireGuard and 2FA.
https://tailscale.com
BSD 3-Clause "New" or "Revised" License
17.23k stars 1.31k forks source link

tsnet: split user facing and backend logging #12095

Closed maisem closed 1 month ago

maisem commented 1 month ago

This adds a new UserLogf field to the Server struct. When set this any logs generated by Server are logged using UserLogf and all spammy backend logs are logged to Logf.

If it UserLogf is unset, we default to log.Printf and if Logf is unset we discard all the spammy logs.

Fixes #12094