Sha256: 2957ec8e374e28238e507a80a4e13a066ef9cf0691b655a5e6e2441e69d8f792

Contents?: true

Size: 530 Bytes

Versions: 18

Compression:

Stored size: 530 Bytes

Contents

module SiteHook
  autoload :Paths, 'site_hook/paths'
  # Logs
  # Give logs related methods
  module Logs
    module_function
    def self.log_levels
      default = {
        'hook' => 'info',
        'build' => 'info',
        'git' => 'info',
        'app' => 'info'
      }
      begin
        log_level = YAML.load_file(SiteHook::Paths.config).fetch('log_levels')
        if log_level
          log_level
        end
      rescue KeyError
        default
      rescue Errno::ENOENT
        default
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
site_hook-0.8.2 lib/site_hook/log.rb
site_hook-0.8.1 lib/site_hook/log.rb
site_hook-0.8.0 lib/site_hook/log.rb
site_hook-0.7.0 lib/site_hook/log.rb
site_hook-0.6.23 lib/site_hook/log.rb
site_hook-0.6.22 lib/site_hook/log.rb
site_hook-0.6.21 lib/site_hook/log.rb
site_hook-0.6.19 lib/site_hook/log.rb
site_hook-0.6.18 lib/site_hook/log.rb
site_hook-0.6.17 lib/site_hook/log.rb
site_hook-0.6.16 lib/site_hook/log.rb
site_hook-0.6.15 lib/site_hook/log.rb
site_hook-0.6.14 lib/site_hook/log.rb
site_hook-0.6.13 lib/site_hook/log.rb
site_hook-0.6.12 lib/site_hook/log.rb
site_hook-0.6.11 lib/site_hook/log.rb
site_hook-0.6.10 lib/site_hook/log.rb
site_hook-0.6.9 lib/site_hook/log.rb