mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-28 22:19:48 +00:00
feature/logtail: pull logtail + netlog out to modular features
Removes 434 KB from the minimal Linux binary, or ~3%. Primarily this comes from not linking in the zstd encoding code. Fixes #17323 Change-Id: I0a90de307dfa1ad7422db7aa8b1b46c782bfaaf7 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
e466488a2a
commit
11b770fbc9
@@ -28,6 +28,7 @@ import (
|
||||
"tailscale.com/client/tailscale/apitype"
|
||||
"tailscale.com/clientupdate"
|
||||
"tailscale.com/envknob"
|
||||
"tailscale.com/feature/buildfeatures"
|
||||
"tailscale.com/health/healthmsg"
|
||||
"tailscale.com/hostinfo"
|
||||
"tailscale.com/ipn"
|
||||
@@ -575,6 +576,15 @@ func (h *Handler) serveGoroutines(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *Handler) serveLogTap(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
if !buildfeatures.HasLogTail {
|
||||
// TODO(bradfitz): separate out logtail tap functionality from upload
|
||||
// functionality to make this possible? But seems unlikely people would
|
||||
// want just this. They could "tail -f" or "journalctl -f" their logs
|
||||
// themselves.
|
||||
http.Error(w, "logtap not supported in this build", http.StatusNotImplemented)
|
||||
return
|
||||
}
|
||||
|
||||
// Require write access (~root) as the logs could contain something
|
||||
// sensitive.
|
||||
if !h.PermitWrite {
|
||||
|
||||
Reference in New Issue
Block a user