Sha256: d0087a9356268cf9bd9461822453212e84d46fb628ad62377f925e50e0572d5d

Contents?: true

Size: 394 Bytes

Versions: 15

Compression:

Stored size: 394 Bytes

Contents

if RUBY_PLATFORM == 'opal'
  # The basic front-end logger, log to console
  class Logger
    def initialize(*args)
      # TODO: handle options
    end

    [:fatal, :info, :warn, :debug, :error].each do |method_name|
      define_method(method_name) do |text, &block|
        text = block.call if block

        `console[method_name](text);`
      end
    end
  end
else
  require 'logger'
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
volt-0.8.27.beta2 lib/volt/extra_core/logger.rb
volt-0.8.27.beta1 lib/volt/extra_core/logger.rb
volt-0.8.26.beta1 lib/volt/extra_core/logger.rb
volt-0.8.26 lib/volt/extra_core/logger.rb
volt-0.8.24 lib/volt/extra_core/logger.rb
volt-0.8.23 lib/volt/extra_core/logger.rb
volt-0.8.22 lib/volt/extra_core/logger.rb
volt-0.8.22.beta2 lib/volt/extra_core/logger.rb
volt-0.8.22.beta1 lib/volt/extra_core/logger.rb
volt-0.8.21 lib/volt/extra_core/logger.rb
volt-0.8.20 lib/volt/extra_core/logger.rb
volt-0.8.19 lib/volt/extra_core/logger.rb
volt-0.8.18 lib/volt/extra_core/logger.rb
volt-0.8.17 lib/volt/extra_core/logger.rb
volt-0.8.16 lib/volt/extra_core/logger.rb