- Introduced `hertzx` package with `NewHertz` function for server initialization. - Implemented `logx` package with various log collectors: Console, Loki, Elasticsearch, and Prometheus. - Added `Logger` struct to manage logging levels and collectors. - Created environment variable loading functionality in `osx` package to support configuration. - Enhanced logging capabilities with structured log entries and asynchronous collection.
14 lines
250 B
Go
14 lines
250 B
Go
package main
|
|
|
|
import (
|
|
"git.liteyuki.org/LiteyukiStudio/folium/logx"
|
|
)
|
|
|
|
func main() {
|
|
// 初始化日志
|
|
logx.Debug("This is a debug log")
|
|
logx.Info("This is an info log")
|
|
logx.Warn("This is a warning log")
|
|
logx.Error("This is an error log")
|
|
}
|