Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose some hidden errors in log. #18

Merged
merged 1 commit into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collector/oplog_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ func GetOplogStatus(session *mgo.Session, maxTimeMS int64) *OplogStatus {
oplogStatus := &OplogStatus{}
collectionStats, err := GetOplogCollectionStats(session, maxTimeMS)
if err != nil {
glog.Error("Failed to get local.oplog_rs collection stats.")
glog.Errorf("Failed to get local.oplog_rs collection stats: %v", err)
return nil
}

headTimestamp, err := GetOplogTimestamp(session, false)
tailTimestamp, err := GetOplogTimestamp(session, true)
if err != nil {
glog.Error("Failed to get oplog head or tail timestamps.")
glog.Errorf("Failed to get oplog head or tail timestamps: %v", err)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion collector/replset_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func GetReplSetConf(session *mgo.Session) *ReplSetConf {
result := &OuterReplSetConf{}
err := session.DB("admin").Run(bson.D{{"replSetGetConfig", 1}}, result)
if err != nil {
glog.Error("Failed to get replSet config.")
glog.Errorf("Failed to get replSet config: %v", err)
return nil
}
return &result.Config
Expand Down
2 changes: 1 addition & 1 deletion collector/replset_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func GetReplSetStatus(session *mgo.Session) *ReplSetStatus {
result := &ReplSetStatus{}
err := session.DB("admin").Run(bson.D{{"replSetGetStatus", 1}}, result)
if err != nil {
glog.Error("Failed to get replSet status.")
glog.Errorf("Failed to get replSet status: %v", err)
return nil
}
return result
Expand Down