https://github.com/sparkoo/yagoll
Yet Another Go Logging Library
https://github.com/sparkoo/yagoll
go log logging logging-library logs yagoll
Last synced: 3 months ago
JSON representation
Yet Another Go Logging Library
- Host: GitHub
- URL: https://github.com/sparkoo/yagoll
- Owner: sparkoo
- License: mit
- Created: 2018-10-01T13:08:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-14T18:52:30.000Z (about 6 years ago)
- Last Synced: 2025-01-11T06:09:48.524Z (4 months ago)
- Topics: go, log, logging, logging-library, logs, yagoll
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yagoll (Yet Another Go Logging Library)
There are many logging libraries for Go and this is one of them. Project was created without any ambitions or higher goals.
I found no logging lib that I was comfortable to work with and has all features I want, so I've created my own.### Wanted features
- [x] easy to migrate from standard Go `log` by changing `import "log"` to `import log "github.com/sparkoo/yagoll"`
- [x] coming from Java world, I'm used to 5 levels -> TRACE, DEBUG, INFO, WARN, ERROR
- [x] ability to filter messages by levels
- [x] print file and line of log message
- [ ] configurable by config file without need to recompile
- [ ] customize message formatting
- [ ] log to file
- [ ] rolling log files
- [ ] filter messages by file/package/pattern### Getting started
`go get github.com/sparkoo/yagoll`
```
import "github.com/sparkoo/yagoll"func main() {
yagoll.Debug("Hello World")
}
```### Migrating from native Go `log`
```
/// current source
import "log"func main() {
log.Println("Hello World")
}
````go get github.com/sparkoo/yagoll`
```
/// new source with yagoll logging
import log "github.com/sparkoo/yagoll" /// just changed import linefunc main() {
log.Println("Hello World")
}
```