Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simia-tech/gol
Go logging package that supports output to console, file and syslog
https://github.com/simia-tech/gol
Last synced: 6 days ago
JSON representation
Go logging package that supports output to console, file and syslog
- Host: GitHub
- URL: https://github.com/simia-tech/gol
- Owner: simia-tech
- License: apache-2.0
- Created: 2014-04-04T09:18:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-01T08:41:27.000Z (over 9 years ago)
- Last Synced: 2024-06-20T03:27:40.429Z (5 months ago)
- Language: Go
- Size: 223 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gol
gol is an extended logger for go, that can log to a console, file and syslog backend via a single interface. It
supports multiple logging channels and the output can be filtered using a mask. On top of this, multiple of
backends can be used at the same time.See [godoc](http://godoc.org/github.com/simia-tech/gol) for more details.
## Usage
package main
import (
"fmt""github.com/simia-tech/gol"
)func main() {
gol.Initialize(
&gol.Configuration{Backend: "console", Mask: "all", Color: true},
&gol.Configuration{Backend: "syslog", Prefix: "gol-test"})gol.Info("number %d", 1)
error := fmt.Errorf("nasty!")
gol.Handle(error)
}