Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoHook ¶
type MongoHook struct {
// contains filtered or unexported fields
}
MongoHook logrus hook for writing logs into mongo collection
func NewMongoHook ¶
func NewMongoHook(collection *mongo.Collection, opts ...MongoHookOption) (*MongoHook, error)
NewMongoHook returns new hook
type MongoHookOption ¶ added in v1.0.0
type MongoHookOption func(*MongoHook)
MongoHookOption mongo hook option
func WithTimeout ¶ added in v1.0.0
func WithTimeout(timeout *time.Duration) MongoHookOption
Click to show internal directories.
Click to hide internal directories.