nsqio / go-diskqueue

A Go package providing a filesystem-backed FIFO queue
MIT License
464 stars 103 forks source link

make New() take nsq-like log func instead of Logger #2

Closed ploxiln closed 7 years ago

ploxiln commented 7 years ago

... to finish up log-level support in nsqd

I wanted to make some use of nsq/internal/lg but

.../src/github.com/nsqio/go-diskqueue/diskqueue.go:17:2: use of internal package not allowed

But wait and see the companion nsq PR, the LogLevel type makes things ugly, it would have been better as an int.

ploxiln commented 7 years ago

btw, I'm open to better ideas (than copying in nsq/internal/lg)

mreiferson commented 7 years ago

I don't really care about backwards compat for this library, let's just improve the API and update the existing New

ploxiln commented 7 years ago

updated. ran "go test" locally, built and ran nsqd for a couple of seconds locally