Skip to content

Commit

Permalink
fixed some error log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-manuel-almaza committed Dec 18, 2024
1 parent 38aeefd commit 4e335df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/collector/corechecks/system/cpu/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c *Check) reportContextSwitches(sender sender.Sender) {
func (c *Check) reportCpuInfo(sender sender.Sender) (numCores int32, err error) {
cpuInfo, err := getCpuInfo()
if err != nil {
log.Errorf("could not retrieve cpu stats: %s", err.Error())
log.Errorf("could not retrieve cpu info: %s", err.Error())
return 0, err
}
log.Debugf("getCpuInfo: %s", cpuInfo)
Expand All @@ -86,7 +86,7 @@ func (c *Check) reportCpuInfo(sender sender.Sender) (numCores int32, err error)
func (c *Check) reportCpuMetricsPercent(sender sender.Sender, numCores int32) (err error) {
cpuTimes, err := getCpuTimes(false)
if err != nil {
log.Errorf("could not retrieve cpu stats: %s", err.Error())
log.Errorf("could not retrieve cpu times: %s", err.Error())
return err
}
log.Debugf("getCpuTimes(false): %s", cpuTimes)
Expand Down Expand Up @@ -131,7 +131,7 @@ func (c *Check) reportCpuMetricsPercent(sender sender.Sender, numCores int32) (e
func (c *Check) reportCpuMetricsPerCpu(sender sender.Sender) (err error) {
cpuTimes, err := getCpuTimes(true)
if err != nil {
log.Errorf("could not retrieve cpu stats: %s", err.Error())
log.Errorf("could not retrieve cpu times: %s", err.Error())
return err
}
log.Debugf("getCpuTimes(true): %s", cpuTimes)
Expand Down

0 comments on commit 4e335df

Please sign in to comment.