Sha256: 0314a080ee96faa3285c5671d4a26eee6c4704ef3b515f6e31dd9556e308604e

Contents?: true

Size: 1007 Bytes

Versions: 24

Compression:

Stored size: 1007 Bytes

Contents

if RUBY_PLATFORM == 'opal'
  require 'volt/extra_core/logger'
else
  require 'logger'
end

# Simple global access to the logger.
# You can also include Log into a class to get the logger
# inside of it.
module Log
  def self.logger
    @logger = Logger.new(STDOUT)
  end

  # Module methods, Log.info...
  def self.fatal(*args, &block)
    logger.fatal(*args, &block)
  end

  def self.info(*args, &block)
    logger.info(*args, &block)
  end

  def self.warn(*args, &block)
    logger.warn(*args, &block)
  end

  def self.debug(*args, &block)
    logger.debug(*args, &block)
  end

  def self.error(*args, &block)
    logger.error(*args, &block)
  end

  # Included methods, info "something"
  def fatal(*args, &block)
    Log.fatal(*args, &block)
  end

  def info(*args, &block)
    Log.info(*args, &block)
  end

  def warn(*args, &block)
    Log.warn(*args, &block)
  end

  def debug(*args, &block)
    Log.debug(*args, &block)
  end

  def error(*args, &block)
    Log.error(*args, &block)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
volt-0.8.15 lib/volt/extra_core/log.rb
volt-0.8.14 lib/volt/extra_core/log.rb
volt-0.8.13 lib/volt/extra_core/log.rb
volt-0.8.11 lib/volt/extra_core/log.rb
volt-0.8.10 lib/volt/extra_core/log.rb
volt-0.8.9 lib/volt/extra_core/log.rb
volt-0.8.8 lib/volt/extra_core/log.rb
volt-0.8.7 lib/volt/extra_core/log.rb
volt-0.8.6 lib/volt/extra_core/log.rb
volt-0.8.5 lib/volt/extra_core/log.rb
volt-0.8.4 lib/volt/extra_core/log.rb
volt-0.8.3 lib/volt/extra_core/log.rb
volt-0.8.2 lib/volt/extra_core/log.rb
volt-0.8.1 lib/volt/extra_core/log.rb
volt-0.8.0 lib/volt/extra_core/log.rb
volt-0.7.23 lib/volt/extra_core/log.rb
volt-0.7.22 lib/volt/extra_core/log.rb
volt-0.7.21 lib/volt/extra_core/log.rb
volt-0.7.20 lib/volt/extra_core/log.rb
volt-0.7.19 lib/volt/extra_core/log.rb