Class: OpenTelemetry::Internal::ProxyLogger Private
- Inherits:
-
Logs::Logger
- Object
- Logs::Logger
- OpenTelemetry::Internal::ProxyLogger
- Defined in:
- lib/opentelemetry/internal/proxy_logger.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
ProxyLogger is an implementation of Logs::Logger. It is returned from the ProxyLoggerProvider until a delegate logger provider is installed. After the delegate logger provider is installed, the ProxyLogger will delegate to the corresponding “real” logger.
Instance Attribute Summary collapse
- #delegate ⇒ Object writeonly private
Instance Method Summary collapse
-
#initialize ⇒ ProxyLogger
constructor
private
Returns a new ProxyLogger instance.
- #on_emit(timestamp: nil, observed_timestamp: nil, severity_number: nil, severity_text: nil, body: nil, trace_id: nil, span_id: nil, trace_flags: nil, attributes: nil, context: nil) ⇒ Object private
Constructor Details
#initialize ⇒ ProxyLogger
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new OpenTelemetry::Internal::ProxyLogger instance.
21 22 23 |
# File 'lib/opentelemetry/internal/proxy_logger.rb', line 21 def initialize @delegate = nil end |
Instance Attribute Details
#delegate=(value) ⇒ Object (writeonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/opentelemetry/internal/proxy_logger.rb', line 16 def delegate=(value) @delegate = value end |
Instance Method Details
#on_emit(timestamp: nil, observed_timestamp: nil, severity_number: nil, severity_text: nil, body: nil, trace_id: nil, span_id: nil, trace_flags: nil, attributes: nil, context: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/opentelemetry/internal/proxy_logger.rb', line 25 def on_emit( timestamp: nil, observed_timestamp: nil, severity_number: nil, severity_text: nil, body: nil, trace_id: nil, span_id: nil, trace_flags: nil, attributes: nil, context: nil ) unless @delegate.nil? return @delegate.on_emit( timestamp: nil, observed_timestamp: nil, severity_number: nil, severity_text: nil, body: nil, trace_id: nil, span_id: nil, trace_flags: nil, attributes: nil, context: nil ) end super end |