-
Notifications
You must be signed in to change notification settings - Fork 513
Description
Problem
An important use case of logging is to allow log records to be sent to multiple export destinations, as seen in these logging libraries:
In the current Logging SDK, a LogRecord is created as a unique_pointer by the SDK, then moved to a processor, then passed by const reference to an exporter. This implementation does not allow more than one processor per Logger.
Solution
One solution could be to implement a Recordable interface, similar to what is currently used for traces. The recordable idea outlined here.
Alternatives Considered
Another possible (simpler but less performant) solution is to pass a LogRecord as a shared_ptr to be shared between the multiple processors/exporters. However, this approach could offer inconsistent performance related to memory-management which is a goal.
Additional Context
Further discussion about the Recordable interface can be found in #44 and #49.