lib/appsignal.rb in appsignal-0.12.beta.53 vs lib/appsignal.rb in appsignal-0.12.beta.54

- old
+ new

@@ -204,23 +204,28 @@ proc do |severity, datetime, progname, msg| "[#{datetime.strftime('%Y-%m-%dT%H:%M:%S')} (process) ##{Process.pid}][#{severity}] #{msg}\n" end end - def start_logger(path) + def start_logger(path_arg=nil) + path = Appsignal.config ? Appsignal.config[:log_file_path] : nil if path && File.writable?(path) && !ENV['DYNO'] && !ENV['SHELLYCLOUD_DEPLOYMENT'] - @logger = Logger.new(File.join(path, 'appsignal.log')) + @logger = Logger.new(path) @logger.formatter = log_formatter else @logger = Logger.new($stdout) @logger.formatter = lambda do |severity, datetime, progname, msg| "appsignal: #{msg}\n" end end @logger.level = Logger::INFO @logger << @in_memory_log.string if @in_memory_log + + if path_arg + @logger.info('Setting the path in start_logger has no effect anymore, set it in the config instead') + end end def extension_loaded? !!@extension_loaded end