Sha256: 9b24c7596e9a0f762c83bdd1150a763d3482733037de925605ca78bb0273005c

Contents?: true

Size: 759 Bytes

Versions: 18

Compression:

Stored size: 759 Bytes

Contents

# typed: ignore

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.com/terms.html

require 'sqreen/performance_notifications/log'
require 'sqreen/performance_notifications/log_performance'
require 'sqreen/configuration'

require 'sqreen/logger'
require 'sqreen/deferred_logger'

# TODO: fold into Sqreen::Logger

module Sqreen
  def self.log_init
    @logger = Sqreen::Logger.new(
      Sqreen.config_get(:log_level).to_s.upcase,
      Sqreen.config_get(:log_location)
    )
    Sqreen::DeferredLogger.instance.flush_to(@logger.instance_eval { @logger })
  rescue => e
    warn "Sqreen logger exception: #{e}"
  end

  def self::log
    @logger || Sqreen::DeferredLogger.instance
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sqreen-1.19.4 lib/sqreen/log.rb
sqreen-1.20.3 lib/sqreen/log.rb
sqreen-1.20.2 lib/sqreen/log.rb
sqreen-1.21.0.beta2 lib/sqreen/log.rb
sqreen-1.21.0.beta1 lib/sqreen/log.rb
sqreen-1.20.1-java lib/sqreen/log.rb
sqreen-1.20.1 lib/sqreen/log.rb
sqreen-1.20.0-java lib/sqreen/log.rb
sqreen-1.20.0 lib/sqreen/log.rb
sqreen-1.19.3-java lib/sqreen/log.rb
sqreen-1.19.3 lib/sqreen/log.rb
sqreen-1.19.2-java lib/sqreen/log.rb
sqreen-1.19.2 lib/sqreen/log.rb
sqreen-1.19.1-java lib/sqreen/log.rb
sqreen-1.19.1 lib/sqreen/log.rb
sqreen-1.19.0-java lib/sqreen/log.rb
sqreen-1.19.0 lib/sqreen/log.rb
sqreen-1.19.0.beta1 lib/sqreen/log.rb