Closed beatgammit closed 9 years ago
One possible solution would be to define a Logger
interface for an object that can be passed in and used for logging. Ideally this would work out of the box with the standard Go log package. We could also optionally support logging with levels.
We should also do some research to see what other projects have done to solve this problem.
This is an interesting approach to this issue:
Interesting. That author is a node.js
dev (author of jade, express and a few other notables), so it looks like he's getting into go
now?
Logger
interface and the ability to inject your own logger. I think this is good enough for now.
When fixing #53, I found that most of debugging information I wanted was in the errors returned from functions. We don't currently report these (e.g. in websocket.go) or even log them.
I think this was mainly due to not wanting a hard dependency on lumber, but the result is that it never got done. We need to decide how to report errors and implement it.