xlog-nsq is an xlog to NSQd output for github.com/rs/xlog.
go get github.com/rs/xlog-nsq
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))
All source code is licensed under the MIT License.