https://github.com/spacetab-io/logs-go
golang logging wrapper
https://github.com/spacetab-io/logs-go
go golang logging logrus wrapper
Last synced: about 1 month 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 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-24T13:01:51.000Z (almost 3 years ago)
- Last Synced: 2025-02-14T22:13:52.706Z (3 months ago)
- Topics: go, golang, logging, logrus, wrapper
- Language: Go
- Size: 116 KB
- Stars: 0
- Watchers: 4
- 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 mainimport (
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).