Home

Awesome

XLog to NSQ Output

godoc license Build Status Coverage

xlog-nsq is an xlog to NSQd output for github.com/rs/xlog.

Install

go get github.com/rs/xlog-nsq

Usage

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.