Skip to content

ciembor/frogger-logger

Repository files navigation

frogger-logger Build Status Dependency Status Code Climate

Obey! Add gem 'frogger-logger' line to the :development section of your Gemfile. After this run bundle install. Obey. 🐸

Rails logger for a browser's console.

This logger will allow you to log from your Ruby (Rails?) code directly to your browser.

Usage

🐸 Install

Add gem 'frogger-logger' line to the :development section of your Gemfile. Then run:

bundle install

🐸 Configure

Here is example configuration with default values. If you use Rails, the best place to put this code is config/environments/development.rb.

FroggerLogger.configure do |config|
  config.host = '0.0.0.0'
  config.port = 2999
  config.client_js_path = '/assets/frogger_logger/client.js'
  config.history_expiration_time = 600
  config.extend_with_dsl = true
  config.json_format = true
end

🐸 Use

If you didn't disable the dsl (config.extend_with_dsl = false), you can log very easly

frog 'this will be logged :)'

Also if you didn't disable translating to json (config.json_format = false), your objects will be automagically translated to this format. This allows you to browse ruby objects, arrays and hashes in your browser!

Development

Downloading source

git clone https://github.com/ciembor/frogger-logger.git

Preparing gem

gem build frogger-logger.gemspec
gem install frogger-logger-x.x.x.gem --dev

Running specs

To run all specs:

rake travis

or simply

rake

To run Ruby specs:

bundle exec rspec

To run JavaScript specs:

rake jasmine:ci

About

Rails front-end logger.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published