Skip to content

Commit 21563c5

Browse files
committed
fix: update logging level to ALERT for subscription handling events
1 parent 2b01d4f commit 21563c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/api_cluster.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5077,7 +5077,7 @@ func (repman *ReplicationManager) handlerMuxAcceptSubscription(w http.ResponseWr
50775077
return
50785078
}
50795079

5080-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "User %s registered as sponsor successfully", userform.Username)
5080+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "User %s registered as sponsor successfully", userform.Username)
50815081

50825082
if repman.Conf.Cloud18SalesSubscriptionValidateScript != "" {
50835083
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Executing script after sponsor validated")
@@ -5090,7 +5090,7 @@ func (repman *ReplicationManager) handlerMuxAcceptSubscription(w http.ResponseWr
50905090

50915091
err = repman.SendSponsorActivationMail(mycluster, userform)
50925092
if err != nil {
5093-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlErr, "Failed to send sponsor activation email to %s: %v", userform.Username, err)
5093+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "Failed to send sponsor activation email to %s: %v", userform.Username, err)
50945094
http.Error(w, "Error sending email :"+err.Error(), 500)
50955095
return
50965096
}
@@ -5101,7 +5101,7 @@ func (repman *ReplicationManager) handlerMuxAcceptSubscription(w http.ResponseWr
51015101

51025102
err = repman.SendSponsorCredentialsMail(mycluster)
51035103
if err != nil {
5104-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlErr, "Failed to send sponsor db credentials to %s: %v", userform.Username, err)
5104+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "Failed to send sponsor db credentials to %s: %v", userform.Username, err)
51055105
http.Error(w, "Error sending email :"+err.Error(), 500)
51065106
return
51075107
}
@@ -5170,7 +5170,7 @@ func (repman *ReplicationManager) handlerMuxRejectSubscription(w http.ResponseWr
51705170
return
51715171
}
51725172

5173-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Pending subscription for %s is rejected!")
5173+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "Pending subscription for %s is rejected!")
51745174

51755175
err = repman.SendPendingRejectionMail(mycluster, userform)
51765176
if err != nil {
@@ -5228,9 +5228,9 @@ func (repman *ReplicationManager) handlerMuxRemoveSponsor(w http.ResponseWriter,
52285228
return
52295229
}
52305230

5231-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Ending subscription from sponsor %s for cluster %s by %s", userform.Username, mycluster.Name, uinfomap["User"])
5231+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "Ending subscription from sponsor %s for cluster %s by %s", userform.Username, mycluster.Name, uinfomap["User"])
52325232
} else {
5233-
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Ending subscription for cluster %s by %s", mycluster.Name, uinfomap["User"])
5233+
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ALERT", "Ending subscription for cluster %s by %s", mycluster.Name, uinfomap["User"])
52345234
}
52355235

52365236
err = repman.EndSubscription(userform, mycluster)

0 commit comments

Comments
 (0)