Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AGMETEOR committed Jan 17, 2025
1 parent 66c3ca5 commit c5e4023
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion otel/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
)

var logger otelLog.Logger
var done bool

func InitLogger() error {
service := "http-proxy-lantern"
Expand All @@ -38,11 +39,14 @@ func InitLogger() error {
)

logger = provider.Logger(service)
done = true
return nil
}

func Debug(ctx context.Context, title string) {
InitLogger() // For now I want to see if I can get logs to the otel collector
if !done {
InitLogger() // For now I want to see if I can get logs to the otel collector
}
var record otelLog.Record
record.SetTimestamp(time.Now())
record.SetBody(otelLog.StringValue(title))
Expand Down

0 comments on commit c5e4023

Please sign in to comment.