Home > Article > Backend Development > New news! Go log library goookit/slog has released version v0.5.1
gookit/slog is an easy-to-use, lightweight, configurable, and extensible log library. Supports multiple levels and outputs to multiple files; built-in file log processing, automatic cutting, cleaning, compression and other enhanced functions.
##Console log effect:
Function introduction
debug
info
notice
warn
error
fatal
panic
Formatter
Log processing, output logs to different places
Processor
handler.Builder, you can quickly and easily build the desired log processor
Format processing
text Two log record formatting
Formatter
Output logs to the console, support color output
Output logs to the specified
io.Writer
Output the log to the specified file, optionally enable
buffer Buffered writing
Output the log to the specified file, Write the file directly without buffering
Output the log to the specified file, and support splitting the file by time and size. It is enabled by default
buffer Buffered writing
Buffered log writing
BackupTime
For more usage, please see
Recommended learning: "go video tutorial》
The above is the detailed content of New news! Go log library goookit/slog has released version v0.5.1. For more information, please follow other related articles on the PHP Chinese website!