ReadableLogRecord
extends LogRecord
in package
Tags
Table of Contents
Constants
- NANOS_PER_SECOND = 1000000000
Properties
- $attributes : array<string|int, mixed>
- $body : mixed
- $context : ContextInterface|null
- $convertedAttributes : AttributesInterface
- $observedTimestamp : int|null
- $severityNumber : int
- $severityText : string|null
- $spanContext : SpanContextInterface
- $timestamp : int|null
- $loggerSharedState : LoggerSharedState
- $scope : InstrumentationScopeInterface
Methods
- __construct() : mixed
- getAttributes() : AttributesInterface
- getBody() : mixed|null
- getContext() : ContextInterface|null
- getInstrumentationScope() : InstrumentationScopeInterface
- getObservedTimestamp() : int|null
- getResource() : ResourceInfo
- getSeverityNumber() : int|null
- getSeverityText() : string|null
- getSpanContext() : SpanContextInterface|null
- getTimestamp() : int|null
- setAttribute() : self
- setAttributes() : self
- setBody() : self
- setContext() : self
- setObservedTimestamp() : self
- setSeverityNumber() : self
- setSeverityText() : self
- setTimestamp() : self
Constants
NANOS_PER_SECOND
public
mixed
NANOS_PER_SECOND
= 1000000000
Properties
$attributes
protected
array<string|int, mixed>
$attributes
= []
$body
protected
mixed
$body
= null
$context
protected
ContextInterface|null
$context
= null
$convertedAttributes
protected
AttributesInterface
$convertedAttributes
$observedTimestamp
protected
int|null
$observedTimestamp
= null
$severityNumber
protected
int
$severityNumber
= 0
$severityText
protected
string|null
$severityText
= null
$spanContext
protected
SpanContextInterface
$spanContext
$timestamp
protected
int|null
$timestamp
= null
$loggerSharedState read-only
private
LoggerSharedState
$loggerSharedState
$scope read-only
private
InstrumentationScopeInterface
$scope
Methods
__construct()
public
__construct(InstrumentationScopeInterface $scope, LoggerSharedState $loggerSharedState, LogRecord $logRecord) : mixed
Parameters
- $scope : InstrumentationScopeInterface
- $loggerSharedState : LoggerSharedState
- $logRecord : LogRecord
getAttributes()
public
getAttributes() : AttributesInterface
Return values
AttributesInterfacegetBody()
public
getBody() : mixed|null
Return values
mixed|nullgetContext()
public
getContext() : ContextInterface|null
Return values
ContextInterface|nullgetInstrumentationScope()
public
getInstrumentationScope() : InstrumentationScopeInterface
Return values
InstrumentationScopeInterfacegetObservedTimestamp()
public
getObservedTimestamp() : int|null
Return values
int|nullgetResource()
public
getResource() : ResourceInfo
Return values
ResourceInfogetSeverityNumber()
public
getSeverityNumber() : int|null
Return values
int|nullgetSeverityText()
public
getSeverityText() : string|null
Return values
string|nullgetSpanContext()
public
getSpanContext() : SpanContextInterface|null
Return values
SpanContextInterface|nullgetTimestamp()
public
getTimestamp() : int|null
Return values
int|nullsetAttribute()
public
setAttribute(string $name, mixed $value) : self
Parameters
- $name : string
- $value : mixed
Return values
selfsetAttributes()
public
setAttributes(iterable<string|int, mixed> $attributes) : self
Parameters
- $attributes : iterable<string|int, mixed>
-
Additional information about the specific event occurrence.
Tags
Return values
selfsetBody()
public
setBody([mixed $body = null ]) : self
Parameters
- $body : mixed = null
-
The log record body
Return values
selfsetContext()
public
setContext([ContextInterface|null $context = null ]) : self
Parameters
- $context : ContextInterface|null = null
Return values
selfsetObservedTimestamp()
public
setObservedTimestamp([int|null $observedTimestamp = null ]) : self
Parameters
- $observedTimestamp : int|null = null
-
Time, in nanoseconds since the unix epoch, when the event was observed by the collection system.
Return values
selfsetSeverityNumber()
public
setSeverityNumber(Severity|int $severityNumber) : self
Parameters
- $severityNumber : Severity|int
Tags
Return values
selfsetSeverityText()
public
setSeverityText(string $severityText) : self
Parameters
- $severityText : string
-
Severity text, also known as log level
Tags
Return values
selfsetTimestamp()
public
setTimestamp(int $timestamp) : self
Parameters
- $timestamp : int
-
Timestamp, in nanoseconds since the unix epoch, when the event occurred.