Categorygithub.com/tsingshaner/go-pkg/log
package
0.4.1
Repository: https://github.com/tsingshaner/go-pkg.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

📄 log

A ready-to-use stubborn log library encapsulates the log module, providing functions such as log output, log level.

✨ Features

  • 可选择 log/slog, zap 作为日志库
  • 支持本地日志文件轮转

📦 Usage

go get -u github.com/tsingshaner/go-pkg/log

🌿 Use log/slog

example/log/slog

⚡ Use zap

Use zap you need add zap to your project dependencies.

go get -u go.uber.org/zap

example/log/zap

🎨 Pretty log

If you want a pretty log in the console for development, you can install a cli tool prettylog.

go install github.com/tsingshaner/go-pkg/prettylog/cmd/prettylog

Then you can use it like this:

go run main.go | prettylog

📄 License

ISC License © 2024-Present qingshaner