New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

g-log-http-info

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-log-http-info - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

4

lib/index.js

@@ -9,7 +9,7 @@ 'use strict';

// [INFO] params = pathname, reqMethod, reqDate, reqStartTime, resStatus
// [INFO] params = parsedUrl, reqMethod, reqDate, reqStartTime, resStatus
function logToConsole(info) {
var status = getResInfo(info.resStatus);
var infoLines = [info.reqMethod + ' ' + info.pathname + ' ' + (info.parsedUrl.query || '') + ' ' + info.resStatus + ' ' + status.symbol, String(Date.now() - info.reqStartTime) + 'ms Response Time', String(info.reqDate)];
var infoLines = [info.reqMethod + ' ' + info.reqUri.pathname + ' ' + (info.reqUri.query || '') + ' ' + info.resStatus + ' ' + status.symbol, String(Date.now() - info.reqStartTime) + 'ms Response Time', String(info.reqDate)];
printInfo(status.color, infoLines);

@@ -16,0 +16,0 @@ }

{
"name": "g-log-http-info",
"version": "0.2.9",
"version": "0.3.0",
"description": "Log HTTP requests and response to console or to log file depending on mode",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,3 +5,3 @@ 'use strict';

// [INFO] params = pathname, reqMethod, reqDate, reqStartTime, resStatus
// [INFO] params = parsedUrl, reqMethod, reqDate, reqStartTime, resStatus

@@ -11,4 +11,4 @@ export default function logToConsole(info) {

const infoLines = [
`${info.reqMethod} ${info.pathname} ${
info.parsedUrl.query || ''} ${info.resStatus} ${status.symbol}`,
`${info.reqMethod} ${info.reqUri.pathname} ${
info.reqUri.query || ''} ${info.resStatus} ${status.symbol}`,
`${String(Date.now() - info.reqStartTime)}ms Response Time`,

@@ -15,0 +15,0 @@ String(info.reqDate)

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