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

yog-log

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-log - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

20

index.js
var fs = require('fs'),
path = require('path'),
domain = require('domain'),
url = require('url'),
crypto = require('crypto');

@@ -252,3 +253,3 @@

this.params['SERVER_PORT'] = req.app.settings ? req.app.settings.port : '';
this.params['QUERY_STRING'] = req.query;
this.params['QUERY_STRING'] = this.getQueryString(req.originalUrl);
this.params['REQUEST_URI'] = req.originalUrl;

@@ -268,2 +269,19 @@ this.params['REQUEST_PATHNAME'] = req._parsedUrl ? req._parsedUrl.pathname : '-';

/**
* 获取请求的querystring
*
* @param {string} url 请求 url
* @return {string} querystring
*/
getQueryString(rawUrl) {
try {
var urlObj = url.parse(rawUrl);
return urlObj.query || '';
}
catch (e) {
console.log(e);
}
return '';
},
/**
* ODP环境下日志的前缀为AppName,非ODP环境需要配置指定前缀

@@ -270,0 +288,0 @@ * @return {[string]} [description]

2

package.json
{
"name": "yog-log",
"version": "0.1.4",
"version": "0.1.5",
"description": "yog logger",

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

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