nickvanw / ircx

Basic callback-driven Go IRC bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove hard dependency on go-kit

mvdan opened this issue · comments

As discussed in #27. This library's needs are simple, so a small interface should suffice. In general, a library should allow plugging in any suitable logging implementation, instead of hard-coding one in particular.

Particularly worrying since the go-kit module is massive, and we don't want to force all ircx users to pull it as a dependency too.

Will send a PR soon.

Hmmm, ircx also uses level, which does more than just using go-kit's logger. Do we really need logging levels beyond "error" and "verbose/debug"? With those two, it's trivial to just add Config.Verbose, so that verbose logs are enabled too. Then we can drop the dependency on level, and on the entirety of go-kit.

@nickvanw thoughts? go-kit contains dozens of packages and tens of thousands of lines of code, so I really don't think it's worth pulling it in to just have a few log lines at different levels.

I would love to get rid of the entirety of go-kit and level, which I think is all overkill. Based on your earlier recommendation, I'm going to switch over to using logrus which is self-contained, offers all of the same features, and something that I have much more experience with.

I'm not sure why I went with go-kit in the first place, but I'm working on a PR now that will switch everything over.

Sorry this has taken so long - the last while at work has been super busy, and I haven't had much time or mental energy for coding outside of work.

Once #32 is reviewed/merged, that should be ready to go.