1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-28 08:38:51 +02:00
opentelemetry-go/internal_logging_test.go
2024-02-29 07:05:28 +01:00

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)
}