Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook is a wrapper around mgo.Collection, which implements the Fire method, so it can be used as a logrus.Hook
func New ¶
func New(origin string, collection *mgo.Collection) *Hook
New returns a ready-to-use logrus.Hook
Example:
logrus.AddHook(mgorus.New("system", mgo.Database("test").C("logs")))
Click to show internal directories.
Click to hide internal directories.