Skip to content

Commit

Permalink
Switch spanhelper from Infof to Tracef (#604)
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Warnicke <[email protected]>
  • Loading branch information
edwarnicke authored Nov 25, 2020
1 parent dae025c commit de6798d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/tools/spanhelper/span_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@ func (s *spanHelper) LogObject(attribute string, value interface{}) {
if s.span != nil {
s.span.LogFields(log.Object(attribute, limitString(msg)))
}
s.logEntry().Infof("%v %s %s=%v%v", s.info.incInfo(), strings.Repeat(separator, s.info.level), attribute, msg, s.getSpan())
s.logEntry().Tracef("%v %s %s=%v%v", s.info.incInfo(), strings.Repeat(separator, s.info.level), attribute, msg, s.getSpan())
}

func (s *spanHelper) LogValue(attribute string, value interface{}) {
if s.span != nil {
s.span.LogFields(log.Object(attribute, limitString(fmt.Sprint(value))))
}
s.logEntry().Infof("%v %s %s=%v%v", s.info.incInfo(), strings.Repeat(separator, s.info.level), attribute, value, s.getSpan())
s.logEntry().Tracef("%v %s %s=%v%v", s.info.incInfo(), strings.Repeat(separator, s.info.level), attribute, value, s.getSpan())
}

func (s *spanHelper) Finish() {
Expand Down Expand Up @@ -274,7 +274,7 @@ func FromContext(ctx context.Context, operation string) (result SpanHelper) {

func (s *spanHelper) printStart(operation string) {
prefix := strings.Repeat(startSeparator, s.info.level)
s.logEntry().Infof("%v%s⎆ %v()%v", s.info.incInfo(), prefix, operation, s.getSpan())
s.logEntry().Tracef("%v%s⎆ %v()%v", s.info.incInfo(), prefix, operation, s.getSpan())
}

// GetSpanHelper - construct a span helper object from current context span
Expand Down

0 comments on commit de6798d

Please sign in to comment.