module Pantheios::Core

Public Class Methods

set_back_end(be) click to toggle source

Sets the back-end used to emit the given log statement

  • Parameters:

    • be The back-end instance. It must respond to the log message, or a ::TypeError will be raised. It may also respond to the requires_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
set_front_end(fe) click to toggle source

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 the severity_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
set_service(svc) click to toggle source

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 the severity_logged? and log messages, or a ::TypeError will be raised. It may also respond to the requires_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