mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-11-21 16:46:38 +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)
|
|
}
|