1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Add initial Logs Bridge API scaffolding (#4907)

* Add go.mod

* Exclude otel/log in versions.yaml

* Add package documentation stub

* Update dependabot config

* Add initial log API scaffolding
This commit is contained in:
Tyler Yahn
2024-02-16 07:09:58 -08:00
committed by GitHub
parent 02b61239cd
commit d3dcb3999c
12 changed files with 487 additions and 0 deletions

32
log/provider.go Normal file
View File

@@ -0,0 +1,32 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package log // import "go.opentelemetry.io/otel/log"
// 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 {
// TODO (#4909): embed an embedded type from otel/log/embedded.
// 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
}