Project

lnjs-rails

0.0
No commit activity in last 3 years
No release in over 3 years
A gemified version of ln.js, an extremely lightweight, natural logging tool.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.11
~> 3.1
~> 10.0
 Project Readme

lnjs-rails

excruciatingly lightweight logging for your RoR app's JS

ln.js is a teensy tool I made for nicely formatted level-cognizant logging in JavaScript. Lover of RoR that I am, I gemified it for easy inclusion in rails apps!

Installation

Add this line to your application's Gemfile:

gem 'lnjs-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lnjs-rails

Usage

Simply require ln.js from your application.js

//= require ln

After this it's easy peasy to instantiate a logger and start logging away like a code-flinging woodsman of sorts! For example:

var logger = new Logger('debug');
logger.log('If I knew a woodchuck who could chuck wood, would you, Chuck, chuck me a smattering of wood?');

It's really just that simple.

License

The gem is available as open source under the terms of the MIT License.