Documentation ¶
Index ¶
- Constants
- type Entries
- type Entry
- type Event
- type LogKeys
- type LogRequest
- type Logger
- func (l *Logger) Debug(event string, obj, opid string, epoch primitive.Timestamp, msg string, ...)
- func (l *Logger) Error(event string, obj, opid string, epoch primitive.Timestamp, msg string, ...)
- func (l *Logger) Fatal(event string, obj, opid string, epoch primitive.Timestamp, msg string, ...)
- func (l *Logger) Info(event string, obj, opid string, epoch primitive.Timestamp, msg string, ...)
- func (l *Logger) NewEvent(typ, name, opid string, epoch primitive.Timestamp) *Event
- func (l *Logger) Output(e *Entry) error
- func (l *Logger) Printf(msg string, args ...interface{})
- func (l *Logger) SetOut(w io.Writer)
- func (l *Logger) Warning(event string, obj, opid string, epoch primitive.Timestamp, msg string, ...)
- type Severity
Constants ¶
View Source
const LogTimeFormat = "2006-01-02T15:04:05.000-0700"
LogTimeFormat is a date-time format to be displayed in the log output
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entries ¶ added in v1.6.0
func Get ¶ added in v1.6.0
func Get(cn *mongo.Collection, r *LogRequest, limit int64, exactSeverity bool) (*Entries, error)
func (Entries) MarshalJSON ¶ added in v1.6.0
type Entry ¶ added in v1.6.0
type Entry struct { ObjID primitive.ObjectID `bson:"-" json:"-"` // to get sense of mgs total ordering while reading logs TS int64 `bson:"ts" json:"ts"` Tns int `bson:"ns" json:"-"` TZone int `bson:"tz" json:"-"` LogKeys `bson:",inline" json:",inline"` Msg string `bson:"msg" json:"msg"` }
func (*Entry) StringNode ¶ added in v1.6.0
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event provides logging for some event (backup, restore)
type LogKeys ¶
type LogKeys struct { Severity Severity `bson:"s" json:"s"` RS string `bson:"rs" json:"rs"` Node string `bson:"node" json:"node"` Event string `bson:"e" json:"e"` ObjName string `bson:"eobj" json:"eobj"` Epoch primitive.Timestamp `bson:"ep,omitempty" json:"ep,omitempty"` OPID string `bson:"opid,omitempty" json:"opid,omitempty"` }
Click to show internal directories.
Click to hide internal directories.