mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-24 20:14:40 +02:00
19 lines
306 B
Go
19 lines
306 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package otel_test
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/go-logr/stdr"
|
|
|
|
"go.opentelemetry.io/otel"
|
|
)
|
|
|
|
func ExampleSetLogger() {
|
|
logger := stdr.New(log.New(os.Stdout, "", log.LstdFlags|log.Lshortfile))
|
|
otel.SetLogger(logger)
|
|
}
|