Skip to content

house9/javascript_safe_logger

Repository files navigation

This gem makes a javascript log method available as a Rails 3.1 asset

in your javascript

log('inside coolFunc', this, arguments);
// or simple
log('hello world!');

and in coffeescript

log 'inside coolFunc', this, arguments
# or simple
log 'hello world!'
  1. Update the Gemfile in your rails project, add the following line

    gem 'javascript_safe_logger'
    
  2. Update the /app/assets/javascript/application.js file

    A. Manually update the file, add this before other requires
    
        //= require safe_logger
    
    B. Or use the generator to update the application.js file
    
        rails generate javascript_safe_logger

Paul Irish released the javascript code with the The Unlicense (aka: public domain), so this gem is also released with the same license.

About

Rails 3.1 javascript asset for Paul Irish console.log wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages