Skip to content

Commit

Permalink
fix up import naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfkeepers committed Nov 5, 2024
1 parent 0566efe commit e662932
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions clog/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/alcionai/clues"
"github.com/alcionai/clues/internal/stringify"
"go.opentelemetry.io/otel/log"
otellog "go.opentelemetry.io/otel/log"
"go.uber.org/zap"
"golang.org/x/exp/maps"
Expand Down Expand Up @@ -62,8 +61,8 @@ func (b builder) log(l logLevel, msg string) {

// set up an otel logging record
// if otelLog is nil, this will eventually no-op
record := log.Record{}
record.SetBody(log.StringValue(msg))
record := otellog.Record{}
record.SetBody(otellog.StringValue(msg))
record.SetSeverity(convertLevel(l))

if b.err != nil {
Expand Down Expand Up @@ -123,14 +122,14 @@ func (b builder) log(l logLevel, msg string) {
}

// add otel logging if provided
otelLog := b.otel
otelLogger := b.otel

if otelLog == nil {
otelLog = cluesNode.OTELLogger()
if otelLogger == nil {
otelLogger = cluesNode.OTELLogger()
}

if otelLog != nil {
otelLog.Emit(b.ctx, record)
if otelLogger != nil {
otelLogger.Emit(b.ctx, record)
}
}

Expand Down

0 comments on commit e662932

Please sign in to comment.