Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eze-kiel/zlog
A thread-safe, customizable logging package for Go programs
https://github.com/eze-kiel/zlog
Last synced: 4 days ago
JSON representation
A thread-safe, customizable logging package for Go programs
- Host: GitHub
- URL: https://github.com/eze-kiel/zlog
- Owner: eze-kiel
- License: mit
- Created: 2021-06-21T12:55:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-04T15:52:43.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T11:49:34.749Z (5 months ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zlog
[![Go Reference](https://pkg.go.dev/badge/github.com/eze-kiel/zlog.svg)](https://pkg.go.dev/github.com/eze-kiel/zlog)
A small, thread-safe logging package for Go, with cool features.
## Getting started
```
go get github.com/eze-kiel/zlog
```## Usage
Here is a simple example about the main features of the package:
```go
package mainimport (
"fmt"
"log""github.com/eze-kiel/zlog"
)func main() {
l := zlog.NewLogger() // create logger
l.Debug("message at debug level")
l.Info("blah at info level")// change log level to warn
if err := l.ParseLevel("warn"); err != nil {
log.Fatal(err)
}l.Info("you cannot see me!")
l.Warn("but you can see me!!")
l.Error("oops, an error !")// disable the colors
l.UseColors(false)
l.Fatal("this one is going to be fatal... :(")
}
```## Documentation
You can get the whole documentation here:
[https://pkg.go.dev/github.com/eze-kiel/zlog](https://pkg.go.dev/github.com/eze-kiel/zlog)
## License
MIT