No description
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| config.go | ||
| entry.go | ||
| formatter.go | ||
| formatter_json.go | ||
| formatter_text.go | ||
| go.mod | ||
| logger.go | ||
| logger_test.go | ||
| README.md | ||
logging
A small configurable Go logging library with console/file output, text/JSON formatting, levels, caller information, timestamps and colors.
Install
go get forgejo.owo.nexus/Lexx/llog
Usage
config := logging.DefaultConfig()
config.Level = logging.Debug
config.File.Enabled = true
config.File.Path = "./app.log"
logger := logging.New(config)
logger.Info("Application started")
logger.Error(err)
logger.Debug("Payload: %h", hex)