module

PlaceOS::LogBackend

Constants

Log = ::Log.for(self)
STDOUT = ActionController.default_backend

Class methods

log_backend(udp_log_host : String | Nil = UDP_LOG_HOST, udp_log_port : Int32 | Nil = UDP_LOG_PORT, default_backend : ::Log::IOBackend = ActionController.default_backend, format : Format = LOG_FORMAT, service_name : String | Nil = nil, service_version : String | Nil = nil)
Source
register_severity_switch_signals(production : Bool, namespaces : Array(String), default : ::Log::Severity = ::Log::Severity::Info, backend = self.log_backend) : Nil

Registers callbacks for USR1 and USR2

USR1 toggles :trace for all Log instances namespaces's Logs to :info if production is true, otherwise it is set to :debug. Log's not registered under namespaces are toggled to default

Usage

  • $ kill -USR1 ${the_application_pid}
Source
trace
Source
trace_logging(enabled : Bool, production : Bool, namespaces : Array(String), default : ::Log::Severity, backend)

Hook to toggle Log instances' :trace severity

enabled

  • true :trace for all Log instances.

  • false returns namespaces's Logs to :info if production is true and otherwise it is set to :debug. Log's that are not registered under namespaces are toggled to default.

Source

Nested types