module Pantheios::Core
Public Class Methods
Sets the back-end used to emit the given log statement
-
Parameters:
-
be
The back-end instance. It must respond to thelog
message, or a ::TypeError will be raised. It may also respond to therequires_prefix?
message, which can be used to indicate whether a prepared prefix is required; if not present, the framework assumes that the back-end requires a prefix
-
-
Returns: The previously registered instance, or
nil
if no previous one was registered
# File lib/pantheios/core.rb, line 333 def self.set_back_end be @@state.set_back_end be end
Sets the front-end that will be used to evaluate whether a given log statement will be logged
-
Parameters:
-
fe
The front-end instance. It must respond to theseverity_logged?
message, or a ::TypeError will be raised
-
-
Returns: The previously registered instance, or
nil
if no previous one was registered
# File lib/pantheios/core.rb, line 316 def self.set_front_end fe @@state.set_front_end fe end
Sets the service that will be used to evaluate whether a given log statement will be logged and to emit it
-
Parameters:
-
svc
The service instance. It must respond to theseverity_logged?
andlog
messages, or a ::TypeError will be raised. It may also respond to therequires_prefix?
message, which can be used to indicate whether a prepared prefix is required; if not present, the framework assumes that the service (back-end) requires a prefix
-
-
Returns: An array of two elements, representing the previous front-end and previous back-end
# File lib/pantheios/core.rb, line 352 def self.set_service svc @@state.set_service svc end