ConsoleExporter
in package
implements
LogRecordExporterInterface
A JSON console exporter for LogRecords. This is only useful for testing; the output is human-readable, and is not compatible with the OTLP format.
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- export() : FutureInterface
- forceFlush() : bool
- shutdown() : bool
- convertInstrumentationScope() : array<string|int, mixed>
- convertLogRecord() : array<string|int, mixed>
- convertResource() : array<string|int, mixed>
- scopeKey() : string
Properties
$transport read-only
private
TransportInterface
$transport
Methods
__construct()
public
__construct(TransportInterface $transport) : mixed
Parameters
- $transport : TransportInterface
export()
public
export(iterable<mixed, ReadableLogRecord> $batch[, CancellationInterface|null $cancellation = null ]) : FutureInterface
Parameters
- $batch : iterable<mixed, ReadableLogRecord>
- $cancellation : CancellationInterface|null = null
Return values
FutureInterfaceforceFlush()
public
forceFlush([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolshutdown()
public
shutdown([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolconvertInstrumentationScope()
private
convertInstrumentationScope(InstrumentationScopeInterface $scope) : array<string|int, mixed>
Parameters
- $scope : InstrumentationScopeInterface
Return values
array<string|int, mixed>convertLogRecord()
private
convertLogRecord(ReadableLogRecord $record) : array<string|int, mixed>
Parameters
- $record : ReadableLogRecord
Return values
array<string|int, mixed>convertResource()
private
convertResource(ResourceInfo $resource) : array<string|int, mixed>
Parameters
- $resource : ResourceInfo
Return values
array<string|int, mixed>scopeKey()
private
scopeKey(InstrumentationScopeInterface $scope) : string
Parameters
- $scope : InstrumentationScopeInterface