Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

common-log-format

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-log-format - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

lib/common-log-format.js

@@ -27,3 +27,3 @@ "use strict";

status: Number(matches[6]),
bytes: Number(matches[7])
bytes: Number(matches[7]) || 0
};

@@ -30,0 +30,0 @@ self.push(JSON.stringify(obj));

{
"name": "common-log-format",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.1.2",
"version": "0.1.3",
"description": "A transform stream, converting common log format to JSON",

@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/common-log-format.git",

@@ -61,1 +61,20 @@ var test = require("tape");

});
test("non-numeric bytes", function(t){
t.plan(1);
var transform = new Clf();
transform.on("readable", function(){
var json = this.read();
logObject = JSON.parse(json);
t.deepEqual(logObject, {
remoteHost: "127.0.0.1",
remoteLogName: "-",
authUser: "-",
date: "2014-06-11T15:51:48.000Z",
request: "GET /package.json HTTP/1.1",
status: 200,
bytes: 0
});
});
transform.write('127.0.0.1 - - [Wed, 11 Jun 2014 15:51:48 GMT] "GET /package.json HTTP/1.1" 200 - "http://localhost:8000/" "userAgent"');
});
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