Skip to content

Commit

Permalink
Reduce exporter's non-essential logs (OpenAtomFoundation#1945)
Browse files Browse the repository at this point in the history
Co-authored-by: wuxianrong <[email protected]>
  • Loading branch information
Mixficsol and wuxianrong authored Aug 31, 2023
1 parent bc08070 commit dabda7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tools/pika_exporter/exporter/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func LoadConfig() error {
}

InfoConf.CheckInfo()
InfoConf.Display()
//InfoConf.Display()

return nil
}
Expand Down Expand Up @@ -75,8 +75,8 @@ func (c *InfoConfig) Display() {
}

func (c *InfoConfig) CheckInfo() {
c.InfoAll = false
c.Info = false
c.InfoAll = false
c.Info = false

if c.Server && c.Data && c.Clients && c.Stats && c.CPU && c.Replication && c.Keyspace {
c.Info = true
Expand Down
6 changes: 3 additions & 3 deletions tools/pika_exporter/exporter/metrics/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (p *regexParser) Parse(m MetricMeta, c Collector, opt ParseOption) {

matchMaps := p.regMatchesToMap(s)
if len(matchMaps) == 0 {
log.Warnf("regexParser::Parse reg find sub match nil. name:%s text:%s", p.name, s)
log.Warnf("regexParser::Parse reg find sub match nil. name:%s", p.name)
}

extracts := make(map[string]string)
Expand All @@ -133,7 +133,7 @@ func (p *regexParser) regMatchesToMap(s string) []map[string]string {

multiMatches := p.reg.FindAllStringSubmatch(s, -1)
if len(multiMatches) == 0 {
log.Errorf("regexParser::regMatchesToMap reg find sub match nil. name:%s text:%s", p.name, s)
log.Errorf("regexParser::regMatchesToMap reg find sub match nil. name:%s", p.name)
return nil
}

Expand Down Expand Up @@ -270,4 +270,4 @@ func convertTimeToUnix(ts string) (int64, error) {
return 0, nil
}
return t.Unix(), nil
}
}

0 comments on commit dabda7e

Please sign in to comment.