https://github.com/spacetab-io/logs-go
golang logging wrapper
https://github.com/spacetab-io/logs-go
go golang logging logrus wrapper
Last synced: 11 months ago
JSON representation
golang logging wrapper
- Host: GitHub
- URL: https://github.com/spacetab-io/logs-go
- Owner: spacetab-io
- License: mit
- Created: 2020-04-01T17:26:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T13:01:51.000Z (about 4 years ago)
- Last Synced: 2025-06-29T22:43:07.381Z (about 1 year ago)
- Topics: go, golang, logging, logrus, wrapper
- Language: Go
- Size: 116 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
logs-go
-------
[](https://circleci.com/gh/spacetab-io/logs-go) [](https://codecov.io/gh/spacetab-io/logs-go)
Wrapper for [zerolog](https://github.com/rs/zerolog) tuned to work with [configuration](https://github.com/spacetab-io/configuration-go) and
sentry hook.
## Usage
Initiate new logger with filled `log.Config` and use it as common zerolog
```go
package main
import (
log "github.com/spacetab-io/logs-go/v2"
)
func main() {
conf := log.Config{
Level: "warn",
Format: "text",
Caller: &log.CallerConfig{
Disabled: false,
CallerSkipFrames: 2,
},
Sentry: &log.SentryConfig{
Enable: true,
DSN: "http://dsn.sentry.com",
},
}
if err := log.Init("test", conf, "logs-go", "v2.*.*", nil); err != nil {
panic(err)
}
log.Warn().Msg("log some warning")
}
```
## Licence
The software is provided under [MIT Licence](LICENCE).