Skip to content

Commit

Permalink
Logger GoDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Dec 27, 2023
1 parent 46182e9 commit bfb95f5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ import (
"go.opentelemetry.io/otel/log/embedded"
)

// Logger TODO: comment.
// Logger emits log records.
//
// Warning: Methods may be added to this interface in minor releases. See
// package documentation on API implementation for information on how to set
// default behavior for unimplemented methods.
type Logger interface {
embedded.Logger

// Emit TODO: comment.
// Emit emits a log record.
//
// This method should not modify the record's attributes.
//
// This method should be safe to call concurrently.
// It should copy the record's attributes if the record is processed asynchronously.
// The implementation should:
// - be safe to call concurrently,
// - handle the trace context passed via ctx argument,
// - not modify the record's attributes,
// - copy the record's attributes in case of asynchronous processing.
Emit(ctx context.Context, record Record)
}

0 comments on commit bfb95f5

Please sign in to comment.