logger

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(w io.Writer, level slog.Level)

Setup 初始化 slog 默认 logger。 w 为日志输出目标,level 为最低日志级别。

func SetupFile

func SetupFile(outputDir, filename string, alsoStderr bool) func()

SetupFile 初始化日志到文件,返回清理函数。 alsoStderr=true 时同时输出到 stderr。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL