https://github.com/tg/slack15
Slack handler for log15
https://github.com/tg/slack15
go log15 logging slack
Last synced: 2 months ago
JSON representation
Slack handler for log15
- Host: GitHub
- URL: https://github.com/tg/slack15
- Owner: tg
- License: mit
- Created: 2015-11-27T23:00:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T09:56:38.000Z (over 8 years ago)
- Last Synced: 2025-12-26T17:16:52.426Z (6 months ago)
- Topics: go, log15, logging, slack
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slack15 – from log15 to Slack [](https://godoc.org/github.com/tg/slack15)
Say hello to Slack handler for [log15](https://github.com/inconshreveable/log15) and
send log messages in Go directly to Slack via [incoming webhook](https://api.slack.com/incoming-webhooks).
You will need at least webhook URL to make it working.
## Quick start
Pass webhook URL to `slack15.Handler` or set it up in `SLACK_WEBHOOK_URL` environmental variable.
```go
log := log15.New()
log.SetHandler(&slack15.Handler{
URL: "", // pass it here, or not
})
log.Info("Whaam!", "who", "Roy Lichtenstein", "when", 1963)
```
