Sha256: 328e66f29cbd1d0f9e6ec099c718c187476c29706857b080f1b8ed00ed5a0eee

Contents?: true

Size: 1000 Bytes

Versions: 23

Compression:

Stored size: 1000 Bytes

Contents

require 'logster/logger'
require 'logster/message'
require 'logster/configuration'
require 'logster/web'
require 'logster/ignore_pattern'

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

23 entries across 23 versions & 1 rubygems

Version Path
logster-1.2.6 lib/logster.rb
logster-1.2.5 lib/logster.rb
logster-1.2.4 lib/logster.rb
logster-1.2.3 lib/logster.rb
logster-1.2.2 lib/logster.rb
logster-1.2.1 lib/logster.rb
logster-1.2.0 lib/logster.rb
logster-1.1.1 lib/logster.rb
logster-1.0.1 lib/logster.rb
logster-1.0.0.3.pre lib/logster.rb
logster-1.0.0.2.pre lib/logster.rb
logster-1.0.0.1.pre lib/logster.rb
logster-1.0.0.0.pre lib/logster.rb
logster-0.9.9 lib/logster.rb
logster-0.8.4.8.pre lib/logster.rb
logster-0.8.4.7.pre lib/logster.rb
logster-0.8.4.6.pre lib/logster.rb
logster-0.8.4.5.pre lib/logster.rb
logster-0.8.4.4.pre lib/logster.rb
logster-0.8.4.3.pre lib/logster.rb