From f53aabff275f2bfb5462c6045536777a1387b3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 17 Jul 2022 11:07:18 +0800 Subject: [PATCH] Disable gVisor log --- gvisor_log.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gvisor_log.go diff --git a/gvisor_log.go b/gvisor_log.go new file mode 100644 index 0000000..1f27c91 --- /dev/null +++ b/gvisor_log.go @@ -0,0 +1,16 @@ +package tun + +import ( + "time" + + gLog "gvisor.dev/gvisor/pkg/log" +) + +func init() { + gLog.SetTarget((*nopEmitter)(nil)) +} + +type nopEmitter struct{} + +func (n *nopEmitter) Emit(depth int, level gLog.Level, timestamp time.Time, format string, v ...interface{}) { +}