Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix merge conflict

  • Loading branch information...
commit d0ff314bc8191bcd2a9a5ced00b8024b2222a8f1 2 parents a2ab4f7 + 3d6684f
@ggoodale ggoodale authored
View
22 LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 Massively Fun <opensource@massivelyfun.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
10 lib-node/jack/jack.js
@@ -70,6 +70,16 @@
return this;
};
+ Logger.prototype.getLevelName = function() {
+ var k, level, v;
+ level = this._level;
+ for (k in LOG_LEVELS) {
+ v = LOG_LEVELS[k];
+ if ((v << 0) === (level << 0)) return k;
+ }
+ return "UNKNOWN";
+ };
+
Logger.prototype.error = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
View
10 lib-web/jack/jack.js
@@ -70,6 +70,16 @@
return this;
};
+ Logger.prototype.getLevelName = function() {
+ var k, level, v;
+ level = this._level;
+ for (k in LOG_LEVELS) {
+ v = LOG_LEVELS[k];
+ if ((v << 0) === (level << 0)) return k;
+ }
+ return "UNKNOWN";
+ };
+
Logger.prototype.error = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "mf-jack",
"description": "Jack, the JS Logger",
- "version": "0.1.0",
+ "version": "0.1.1",
"author": "Mason Browne <mason@massivelyfun.com>",
"contributors": [
{ "name": "Dean Hudson", "email": "dean@massivelyfun.com"},
View
8 src-common/jack.coffee
@@ -35,10 +35,18 @@ class Logger
addAppender: (appender) ->
@_appenders.push appender
this
+
level: (level) ->
@_level = level
this
+ getLevelName: ->
+ level = @_level
+ for k,v of LOG_LEVELS
+ if ((v << 0) == (level << 0))
+ return k
+ return "UNKNOWN"
+
error: (args...) ->
@log LOG_LEVELS.ERROR, args
this
Please sign in to comment.
Something went wrong with that request. Please try again.