https://github.com/rs/xlog-nsq
XLog to NSQ Output
https://github.com/rs/xlog-nsq
Last synced: 7 months ago
JSON representation
XLog to NSQ Output
- Host: GitHub
- URL: https://github.com/rs/xlog-nsq
- Owner: rs
- License: mit
- Created: 2015-11-06T23:47:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-06T23:55:53.000Z (over 10 years ago)
- Last Synced: 2025-06-19T06:54:53.032Z (11 months ago)
- Language: Go
- Size: 0 Bytes
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XLog to NSQ Output
[](https://godoc.org/github.com/rs/xlog-nsq) [](https://raw.githubusercontent.com/rs/xlog-nsq/master/LICENSE) [](https://travis-ci.org/rs/xlog-nsq) [](http://gocover.io/github.com/rs/xlog-nsq)
xlog-nsq is an xlog to [NSQd](http://nsq.io) output for [github.com/rs/xlog](https://github.com/rs/xlog).
## Install
go get github.com/rs/xlog-nsq
## Usage
```go
c := xhandler.Chain{}
nsqCfg := nsq.NewConfig()
nsqTopic := "mytopic"
nsqAddr := "127.0.0.1:4150"
p := nsq.NewProducer(nsqAddr, nsqCfg)
o := xlognsq.New(nsqTopic, p)
logCfg := xlog.Config{
Output: xlog.NewOutputChannel(o),
}
c.UseC(xlog.NewHandler(logCfg))
```
## Licenses
All source code is licensed under the [MIT License](https://raw.github.com/rs/xlog-nsq/master/LICENSE).