Comparing version 0.4.0 to 0.5.0
@@ -18,1 +18,21 @@ exports.parse = require('./lib/logfmt_parser').parse; | ||
} | ||
try { | ||
//this will fail if express is not on the require path | ||
var body_parser = require('./lib/body_parser') | ||
var logplex = function (body) { | ||
var lines = [] | ||
body.split("\n").forEach(function(line){ | ||
lines.push(logfmt.parse(line)) | ||
}) | ||
return lines; | ||
} | ||
exports.bodyParser = function() { | ||
return body_parser({content_type: "application/logplex-1", parser: logplex}) | ||
} | ||
} | ||
catch(e){ | ||
//no express defined | ||
} |
{ | ||
"name": "logfmt", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Key-Value log line parser", | ||
@@ -5,0 +5,0 @@ "main": "logfmt.js", |
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
14810
245