Sha256: 877dfa4ecb567e4c3234f3834722bbbd4525d37ddebb7bb0b5b1bba9fb0d49bf

Contents?: true

Size: 1.18 KB

Versions: 25

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

require 'logster/version'
require 'logster/logger'
require 'logster/message'
require 'logster/configuration'
require 'logster/web'
require 'logster/ignore_pattern'
require 'logster/pattern'
require 'logster/suppression_pattern'
require 'logster/grouping_pattern'
require 'logster/group'
require 'logster/cache'

if defined? Redis
  require 'logster/redis_store'
else
  STDERR.puts "ERROR: Redis is not loaded, ensure redis gem is required before logster"
  exit
end

module Logster
  def self.logger=(logger)
    @logger = logger
  end

  def self.logger
    @logger
  end

  def self.store=(store)
    @store = store
  end

  def self.store
    @store
  end

  def self.config=(config)
    @config = config
  end

  def self.config
    @config ||= Configuration.new
  end

  def self.add_to_env(env, key, value)
    logster_env = Logster::Message.populate_from_env(env)
    logster_env[key] = value
  end

  def self.set_environments(envs)
    config.environments = envs
  end
end

# check logster/configuration.rb for config options
# Logster.config.environments << :staging

if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
  require 'logster/rails/railtie'
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
logster-2.12.2 lib/logster.rb
logster-2.12.1 lib/logster.rb
logster-2.11.4 lib/logster.rb
logster-2.11.3 lib/logster.rb
logster-2.11.2 lib/logster.rb
logster-2.11.1 lib/logster.rb
logster-2.11.0 lib/logster.rb
logster-2.10.1 lib/logster.rb
logster-2.10.0 lib/logster.rb
logster-2.9.8 lib/logster.rb
logster-2.9.7 lib/logster.rb
logster-2.9.6 lib/logster.rb
logster-2.9.5 lib/logster.rb
logster-2.9.4 lib/logster.rb
logster-2.9.3 lib/logster.rb
logster-2.9.2 lib/logster.rb
logster-2.9.1 lib/logster.rb
logster-2.9.0 lib/logster.rb
logster-2.8.0 lib/logster.rb
logster-2.7.1 lib/logster.rb