From daf26145907af0d89ae0f2ce17839480b9064f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=81=E6=98=8E=E6=99=9310296073?= Date: Thu, 10 Sep 2026 09:34:29 +0800 Subject: [PATCH] log: support to set output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 宁明晓10296073 --- context.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/context.go b/context.go index e43ca0b..feb57df 100644 --- a/context.go +++ b/context.go @@ -164,6 +164,10 @@ func SetLevel[T levelValue](level T) error { return nil } +func SetOutput(out io.Writer) { + L.Logger.SetOutput(out) +} + // GetLevel returns the current log level. func GetLevel() Level { return L.Logger.GetLevel()