Get a logger from the default logger provider
get_logger(
name = NULL,
minimum_severity = NULL,
version = NULL,
schema_url = NULL,
attributes = NULL,
...,
provider = NULL
)Name of the new tracer. If missing, then deduced automatically.
A log level, the minimum severity log messages to log. See log_severity_levels.
Optional. Specifies the version of the instrumentation
scope if the scope has a version (e.g. R package version).
Example value: "1.0.0".
Optional. Specifies the Schema URL that should be recorded in the emitted telemetry.
Optional. Specifies the instrumentation scope attributes to associate with emitted telemetry.
Additional arguments are passed to the get_logger()
method of the provider.
Tracer provider to use. If NULL, then it uses
get_default_tracer_provider() to get a tracer provider.
An otel_logger object.
Other low level logs API:
get_default_logger_provider(),
logger_provider_noop,
otel_logger,
otel_logger_provider
myfun <- function() {
lgr <- otel::get_logger()
otel::log("Log message", logger = lgr)
}
myfun()