Permalink
Browse files

added README, Licence

  • Loading branch information...
1 parent 48095fa commit 5ac68afda7ed2472ac02b71e58cc0bbaa994a1ac @girishso committed Jan 30, 2013
Showing with 44 additions and 11 deletions.
  1. +1 −1 MIT-LICENSE
  2. +36 −0 README.md
  3. +0 −3 README.rdoc
  4. +7 −7 vendor/assets/javascripts/js_logger.js
View
@@ -1,4 +1,4 @@
-Copyright 2013 YOURNAME
+Copyright 2013 Girish Sonawane
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -0,0 +1,36 @@
+# What this is for?
+
+Rails engine to log from Client side (Browser) javascript to server. Makes a global javascript variable available, 'jsLogger', which provides a variety of safe logging functions e.g. jsLogger.debug(), jsLogger.error().
+
+There are 5 levels of logging: debug, info, warn, error and fatal.
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'js-logger'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install js-logger
+
+## Usage
+
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+## Licence
+MIT License
+
+Copyright (c) 2013 Girish Sonawane (girish dot sonawane at gmail dot com)
+
View
@@ -1,3 +0,0 @@
-= JsLogger
-
-This project rocks and uses MIT-LICENSE.
@@ -1,22 +1,22 @@
-(function( JSLogger, $, undefined ) {
+(function( jsLogger, $, undefined ) {
//Public Method
- JSLogger.debug = function(message) {
+ jsLogger.debug = function(message) {
invoke('debug', message);
};
- JSLogger.info = function(message) {
+ jsLogger.info = function(message) {
invoke('info', message);
};
- JSLogger.warn = function(message) {
+ jsLogger.warn = function(message) {
invoke('warn', message);
};
- JSLogger.error = function(message) {
+ jsLogger.error = function(message) {
invoke('error', message);
};
- JSLogger.fatal = function(message) {
+ jsLogger.fatal = function(message) {
invoke('fatal', message);
};
@@ -31,4 +31,4 @@
url: "/logger/js_logger/log"
})
}
-}( window.JSLogger = window.JSLogger || {}, jQuery ));
+}( window.jsLogger = window.jsLogger || {}, jQuery ));

0 comments on commit 5ac68af

Please sign in to comment.