Skip to content

Commit

Permalink
Merge pull request #619 from signal18/log-management
Browse files Browse the repository at this point in the history
solve missing parameters within log sql
  • Loading branch information
caffeinated92 authored Jun 3, 2024
2 parents 87a0b35 + 7c59f5c commit 9abfe66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster/cluster_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (cluster *Cluster) display() {

func (cluster *Cluster) LogSQL(logs string, err error, url string, from string, level string, format string, args ...interface{}) {
if err != nil && args != nil {
cluster.LogPrintf(level, format, args)
cluster.LogPrintf(level, format, args...)
}
if logs != "" {
if err != nil {
Expand Down Expand Up @@ -174,7 +174,7 @@ func (cluster *Cluster) LogPrintf(level string, format string, args ...interface
cluster.LogSlack.WithFields(log.Fields{"cluster": cluster.Name, "type": "alert", "channel": "Slack"}).Errorf(cliformat, args...)
}
if cluster.Conf.TeamsUrl != "" {
go cluster.sendMsTeams(level, format, args)
go cluster.sendMsTeams(level, format, args...)
}
case "INFO":
log.WithField("cluster", cluster.Name).Infof(cliformat, args...)
Expand Down Expand Up @@ -339,7 +339,7 @@ func (cluster *Cluster) LogModulePrintf(forcingLog bool, module int, level strin
cluster.LogSlack.WithFields(log.Fields{"cluster": cluster.Name, "type": "alert", "channel": "Slack"}).Errorf(cliformat, args...)
}
if cluster.Conf.TeamsUrl != "" {
go cluster.sendMsTeams(level, format, args)
go cluster.sendMsTeams(level, format, args...)
}
case "INFO":
log.WithField("cluster", cluster.Name).Infof(cliformat, args...)
Expand Down

0 comments on commit 9abfe66

Please sign in to comment.