Skip to content

Commit

Permalink
Logger and LoggerProvider GoDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Dec 27, 2023
1 parent bfb95f5 commit f1713a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ import (
// package documentation on API implementation for information on how to set
// default behavior for unimplemented methods.
type Logger interface {
// Users of the interface can ignore this. This embedded type is only used
// by implementations of this interface. See the "API Implementations"
// section of the package documentation for more information.
embedded.Logger

// Emit emits a log record.
//
// The implementation should:
// This method should:
// - be safe to call concurrently,
// - handle the trace context passed via ctx argument,
// - not modify the record's attributes,
Expand Down
11 changes: 8 additions & 3 deletions log/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ import (
"go.opentelemetry.io/otel/log/embedded"
)

// LoggerProvider TODO: comment.
// LoggerProvider provides access to named [Logger] instances.
//
// 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 LoggerProvider interface {
// Users of the interface can ignore this. This embedded type is only used
// by implementations of this interface. See the "API Implementations"
// section of the package documentation for more information.
embedded.LoggerProvider

// Logger TODO: comment.
// Logger returns a new [Logger] with the provided name and configuration.
//
// This method should be safe to call concurrently.
// This method should:
// - be safe to call concurrently,
// - use some default name if the passed name is empty.
Logger(name string, options ...LoggerOption) Logger
}

Expand Down

0 comments on commit f1713a6

Please sign in to comment.