Class ExtendedDefaultLogger.NoopLogRecordBuilder
- All Implemented Interfaces:
ExtendedLogRecordBuilder
,LogRecordBuilder
- Enclosing class:
ExtendedDefaultLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
emit()
Emit the log record.<T> LogRecordBuilder
setAttribute
(AttributeKey<T> key, T value) Sets an attribute.Set the bodyValue
.Set the body string.setContext
(Context context) Set the context.setObservedTimestamp
(long timestamp, TimeUnit unit) Set the epochobservedTimestamp
, using the timestamp and unit.setObservedTimestamp
(Instant instant) Set theobservedTimestamp
, using the instant.setSeverity
(Severity severity) Set the severity.setSeverityText
(String severityText) Set the severity text.setTimestamp
(long timestamp, TimeUnit unit) Set the epochtimestamp
, using the timestamp and unit.setTimestamp
(Instant instant) Set the epochtimestamp
, using the instant.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.opentelemetry.api.logs.LogRecordBuilder
setAllAttributes
-
Constructor Details
-
NoopLogRecordBuilder
private NoopLogRecordBuilder()
-
-
Method Details
-
setTimestamp
Description copied from interface:LogRecordBuilder
Set the epochtimestamp
, using the timestamp and unit.The
timestamp
is the time at which the log record occurred. If unset, it will be set to the current time whenLogRecordBuilder.emit()
is called.- Specified by:
setTimestamp
in interfaceLogRecordBuilder
-
setTimestamp
Description copied from interface:LogRecordBuilder
Set the epochtimestamp
, using the instant.The
timestamp
is the time at which the log record occurred. If unset, it will be set to the current time whenLogRecordBuilder.emit()
is called.- Specified by:
setTimestamp
in interfaceLogRecordBuilder
-
setObservedTimestamp
Description copied from interface:LogRecordBuilder
Set the epochobservedTimestamp
, using the timestamp and unit.The
observedTimestamp
is the time at which the log record was observed. If unset, it will be set to thetimestamp
.observedTimestamp
may be different fromtimestamp
if logs are being processed asynchronously (e.g. from a file or on a different thread).- Specified by:
setObservedTimestamp
in interfaceLogRecordBuilder
-
setObservedTimestamp
Description copied from interface:LogRecordBuilder
Set theobservedTimestamp
, using the instant.The
observedTimestamp
is the time at which the log record was observed. If unset, it will be set to thetimestamp
.observedTimestamp
may be different fromtimestamp
if logs are being processed asynchronously (e.g. from a file or on a different thread).- Specified by:
setObservedTimestamp
in interfaceLogRecordBuilder
-
setContext
Description copied from interface:LogRecordBuilder
Set the context.- Specified by:
setContext
in interfaceLogRecordBuilder
-
setSeverity
Description copied from interface:LogRecordBuilder
Set the severity.- Specified by:
setSeverity
in interfaceLogRecordBuilder
-
setSeverityText
Description copied from interface:LogRecordBuilder
Set the severity text.- Specified by:
setSeverityText
in interfaceLogRecordBuilder
-
setBody
Description copied from interface:LogRecordBuilder
Set the body string.Shorthand for calling
LogRecordBuilder.setBody(Value)
withValue.of(String)
.- Specified by:
setBody
in interfaceLogRecordBuilder
-
setBody
Description copied from interface:LogRecordBuilder
Set the bodyValue
.- Specified by:
setBody
in interfaceLogRecordBuilder
-
setAttribute
Description copied from interface:LogRecordBuilder
Sets an attribute.- Specified by:
setAttribute
in interfaceLogRecordBuilder
-
emit
public void emit()Description copied from interface:LogRecordBuilder
Emit the log record.- Specified by:
emit
in interfaceLogRecordBuilder
-