aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db.go')
-rw-r--r--db.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/db.go b/db.go
index c5f74ef..9090626 100644
--- a/db.go
+++ b/db.go
@@ -180,7 +180,7 @@ func dbGetMxRoom(protocol string, roomId connector.RoomID) (string, error) {
mx_room_id, err = mx.CreateRoom(name, alias, []string{})
if err != nil {
- log.Printf("Could not create room for %s: %s", name, err)
+ log.Warnf("Could not create room for %s: %s", name, err)
return "", err
}
}
@@ -192,7 +192,7 @@ func dbGetMxRoom(protocol string, roomId connector.RoomID) (string, error) {
}
db.Create(&room)
}
- log.Debugf("Got room id: %s", room.MxRoomID)
+ log.Tracef("Got room id for %s %s: %s", protocol, roomId, room.MxRoomID)
return room.MxRoomID, nil
}
@@ -215,7 +215,7 @@ func dbGetMxPmRoom(protocol string, them connector.UserID, themMxId string, usMx
mx_room_id, err := mx.CreateDirectRoomAs([]string{usMxId}, themMxId)
if err != nil {
- log.Printf("Could not create room for %s: %s", name, err)
+ log.Warnf("Could not create room for %s: %s", name, err)
return "", err
}
@@ -234,7 +234,7 @@ func dbGetMxPmRoom(protocol string, them connector.UserID, themMxId string, usMx
}
db.Create(&room)
}
- log.Debugf("Got PM room id: %s", room.MxRoomID)
+ log.Tracef("Got PM room id for %s %s %s %s: %s", usMxId, protocol, usAccount, them, room.MxRoomID)
return room.MxRoomID, nil
}
@@ -256,7 +256,7 @@ func dbGetMxUser(protocol string, userId connector.UserID) (string, error) {
err := mx.RegisterUser(username)
if err != nil {
if mxE, ok := err.(*mxlib.MxError); !ok || mxE.ErrCode != "M_USER_IN_USE" {
- log.Printf("Could not register %s: %s", username, err)
+ log.Warnf("Could not register %s: %s", username, err)
return "", err
}
}