Class: ScoutApm::LoggerFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/agent_context.rb

Class Method Summary collapse

Class Method Details

.build(config, environment) ⇒ Object



226
227
228
229
230
231
232
233
234
235
236
# File 'lib/scout_apm/agent_context.rb', line 226

def self.build(config, environment)
  ScoutApm::Logger.new(environment.root,
    {
      :log_level     => config.value('log_level'),
      :log_file_path => config.value('log_file_path'),
      :stdout        => config.value('log_stdout') || environment.platform_integration.log_to_stdout?,
      :stderr        => config.value('log_stderr'),
      :logger_class  => config.value('log_class'),
    }
  )
end

.build_minimal_loggerObject



238
239
240
# File 'lib/scout_apm/agent_context.rb', line 238

def self.build_minimal_logger
  ScoutApm::Logger.new(nil, :stdout => true)
end