Sha256: bc2df543fa83fdadfcda5e693b8c6548eafd8b499fb6610d1f60271dca491538

Contents?: true

Size: 1.2 KB

Versions: 18

Compression:

Stored size: 1.2 KB

Contents

require 'fileutils'

module Oxidized
  class OxidizedError < StandardError; end

  Directory = File.expand_path(File.join(File.dirname(__FILE__), '../'))

  require 'oxidized/version'
  require 'oxidized/string'
  require 'oxidized/config'
  require 'oxidized/config/vars'
  require 'oxidized/worker'
  require 'oxidized/nodes'
  require 'oxidized/manager'
  require 'oxidized/hook'
  require 'oxidized/core'

  def self.asetus
    @@asetus
  end

  def self.asetus=(val)
    @@asetus = val
  end

  def self.config
    asetus.cfg
  end

  def self.logger
    @@logger
  end

  def self.logger=(val)
    @@logger = val
  end

  def self.setup_logger
    FileUtils.mkdir_p(Config::Log) unless File.directory?(Config::Log)
    self.logger = if config.has_key?('use_syslog') && config.use_syslog
                    require 'syslog/logger'
                    Syslog::Logger.new('oxidized')
                  else
                    require 'logger'
                    if config.has_key?('log')
                      Logger.new(File.expand_path(config.log))
                    else
                      Logger.new(STDERR)
                    end
                  end
    logger.level = Logger::INFO unless config.debug
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized.rb
oxidized-0.28.0 lib/oxidized.rb
oxidized-0.27.0 lib/oxidized.rb
oxidized-0.26.3 lib/oxidized.rb
oxidized-0.26.2 lib/oxidized.rb
oxidized-0.26.1 lib/oxidized.rb
oxidized-0.26.0 lib/oxidized.rb
oxidized-0.25.1 lib/oxidized.rb
oxidized-0.25.0 lib/oxidized.rb
oxidized-0.24.0 lib/oxidized.rb
oxidized-0.23.0 lib/oxidized.rb
oxidized-0.22.0 lib/oxidized.rb
oxidized-0.21.0 lib/oxidized.rb
oxidized-0.20.0 lib/oxidized.rb
oxidized-0.19.0 lib/oxidized.rb
oxidized-0.18.0 lib/oxidized.rb
oxidized-0.17.0 lib/oxidized.rb
oxidized-0.16.3 lib/oxidized.rb