1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-26 21:05:00 +02:00
opentelemetry-go/internal_logging_test.go

19 lines
306 B
Go
Raw Normal View History

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
2021-11-24 22:06:39 +02:00
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)
}