Socket
Socket
Sign inDemoInstall

logfmt

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logfmt - npm Package Compare versions

Comparing version 0.18.0 to 0.18.1

1

examples/https.js

@@ -0,1 +1,2 @@

var http = require('http');

@@ -2,0 +3,0 @@ var logfmt = require('../logfmt');

2

lib/request_logger.js

@@ -8,3 +8,3 @@ var commonFormatter = function(req, res){

//in express it is an attribute
var path = req.path;
var path = req.path || req.url;
}

@@ -11,0 +11,0 @@

{
"name": "logfmt",
"version": "0.18.0",
"version": "0.18.1",
"description": "key=value logger and parser",

@@ -5,0 +5,0 @@ "main": "logfmt.js",

@@ -136,2 +136,11 @@ var logfmt = require('../logfmt'),

test("commonFormatter uses correct path w. vanilla http", function(){
var mockReq = {method: 'GET'}
mockReq.url = '/bar'
mockReq.ip = '1.0.0.1'
var mockRes = {statusCode: 200}
var actual = logfmt.requestLogger.commonFormatter(mockReq, mockRes);
assert.equal('/bar', actual.path);
})
test("commonFormatter uses correct ip", function(){

@@ -138,0 +147,0 @@ var mockReq = {method: 'GET'}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc