0.0
No commit activity in last 3 years
No release in over 3 years
This logger will you to log from server-side applications (like Ruby on Rails or Sinatra) to the browser's JavaScript console.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0.0
 Project Readme

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