mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-01 17:49:02 +00:00
This rewrites the netlog package to support embedding node information in network flow logs. Some bit of complexity comes in trying to pre-compute the expected size of the log message after JSON serialization to ensure that we can respect maximum body limits in log uploading. We also fix a bug in tstun, where we were recording the IP address after SNAT, which was resulting in non-sensible connection flows being logged. Updates tailscale/corp#33352 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
15 lines
415 B
Go
15 lines
415 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build ts_omit_netlog || ts_omit_logtail
|
|
|
|
package netlog
|
|
|
|
type Logger struct{}
|
|
|
|
func (*Logger) Startup(...any) error { return nil }
|
|
func (*Logger) Running() bool { return false }
|
|
func (*Logger) Shutdown(any) error { return nil }
|
|
func (*Logger) ReconfigNetworkMap(any) {}
|
|
func (*Logger) ReconfigRoutes(any) {}
|