Remove glog package dependency to avoid 'flag redefined'
tinti opened this issue · 3 comments
The package http://github.com/golang/glog defines several flags in its init()
.
When a program defines some flags and imports http://github.com/google/goexpect it may have some flags redefined.
Would be great if goexpect
(due to glog
) does not restrict the set of flags that can be used. For this I have two proposals:
- Drop
glog
completely and uselog
package. - Drop
glog
partially by allowing the user to set their custom logger for the package. Implementglog
andlog
interface in this custom logger.
The first one is poorly implemented here: http://github.com/tinti/goexpect
Thx. for explanation why you'd like to have the logger removed. I'm not very invested in glog , it's just there b/c this happens to be a google project origninally and then the standard logger used is glog.
Think the way to go here is just to swap glog for the standard logger leaving the Logging option in there for the ability to swap back to glog .
And btw. feel free to drop me a PR if you already have the code.
Thx for the PR tinti@! ..