2024-02-16 07:09:58 -08:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-02-29 07:05:28 +01:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2024-02-16 07:09:58 -08:00
|
|
|
|
|
|
|
package log // import "go.opentelemetry.io/otel/log"
|
|
|
|
|
2024-02-18 07:51:13 -08:00
|
|
|
import "go.opentelemetry.io/otel/log/embedded"
|
|
|
|
|
2024-02-16 07:09:58 -08:00
|
|
|
// LoggerProvider provides access to [Logger].
|
|
|
|
//
|
|
|
|
// 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 {
|
2024-02-18 07:51:13 -08:00
|
|
|
// 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
|
2024-02-16 07:09:58 -08:00
|
|
|
|
|
|
|
// Logger returns a new [Logger] with the provided name and configuration.
|
|
|
|
//
|
|
|
|
// If name is empty, implementations need to provide a default name.
|
|
|
|
//
|
|
|
|
// Implementations of this method need to be safe for a user to call
|
|
|
|
// concurrently.
|
|
|
|
Logger(name string, options ...LoggerOption) Logger
|
|
|
|
}
|