Package io.opentelemetry.api.logs
Interface LoggerBuilder
public interface LoggerBuilder
Builder class for creating
Logger
instances.
Logger
s are identified by their scope name, version, and schema URL. These identifying
fields, along with attributes, combine to form the instrumentation scope, which is attached to
all log records produced by the Logger
.
- Since:
- 1.27.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Gets or creates aLogger
instance.setInstrumentationVersion
(String instrumentationScopeVersion) Sets the instrumentation scope version of the resultingLogger
.setSchemaUrl
(String schemaUrl) Set the scope schema URL of the resultingLogger
.
-
Method Details
-
setSchemaUrl
- Parameters:
schemaUrl
- The schema URL.- Returns:
- this
-
setInstrumentationVersion
- Parameters:
instrumentationScopeVersion
- The instrumentation scope version.- Returns:
- this
-
build
Logger build()Gets or creates aLogger
instance.- Returns:
- a
Logger
instance configured with the provided options.
-