Comparing version 0.3.0 to 0.4.0
@@ -145,2 +145,7 @@ /** | ||
// aliases for to be compatible with the console | ||
_.forEach({log: 'debug', warn: 'warning'}, function (from, to) { | ||
this[to] = this[from]; | ||
}.bind(gelf)); | ||
module.exports = gelf; |
{ | ||
"name": "gelf-pro", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"main": "./lib/gelf-pro.js", | ||
@@ -5,0 +5,0 @@ "author": "Kanstantsin Kamkou <kkamkou@gmail.com>", |
@@ -10,3 +10,3 @@ node-gelf pro | ||
"dependencies": { | ||
"gelf-pro": "~0.3" | ||
"gelf-pro": "~0.4" | ||
} | ||
@@ -49,3 +49,3 @@ ``` | ||
### Levels | ||
```emergency```, ```alert```, ```critical```, ```error```, ```warning```, ```notice```, ```info```, ```debug``` | ||
`emergency`, `alert`, `critical`, `error`, `warning` (`warn`), `notice`, `info`, `debug` (`log`) | ||
@@ -73,3 +73,3 @@ ### Adapters | ||
Copyright (c) 2013-2015 Kanstantsin Kamkou | ||
Copyright (c) 2013-2016 Kanstantsin Kamkou | ||
@@ -76,0 +76,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of |
@@ -24,3 +24,2 @@ 'use strict'; | ||
// tests | ||
module.exports = { | ||
@@ -36,2 +35,17 @@ 'Core functionality': { | ||
'Predefined levels': function () { | ||
var levels = { | ||
emergency: 0, alert: 1, critical: 2, error: 3, warning: 4, warn: 4, notice: 5, info: 6, | ||
debug: 7, log: 7 | ||
}; | ||
var gelf = _.cloneDeep(gelfOriginal); | ||
sinon.spy(gelf, 'getStringFromObject'); | ||
_.forEach(levels, function (lvl, fnc) { | ||
gelf[fnc]('test'); | ||
JSON.parse(gelf.getStringFromObject.lastCall.returnValue).level.should.equal(lvl); | ||
}); | ||
}, | ||
'Predefined fields': function () { | ||
@@ -38,0 +52,0 @@ var gelf = _.cloneDeep(gelfOriginal), |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22797
507