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

@coast/logger

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coast/logger - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

43

dist/main.js

@@ -33,7 +33,46 @@ "use strict";

})
}]; // create default logger instance
}]; // serializer to pull useful fields from the req object
function reqSerializer(req) {
if (!req || !req.connection) {
return req;
}
var method = req.method,
url = req.url,
headers = req.headers,
_req$connection = req.connection,
remoteAddress = _req$connection.remoteAddress,
remotePort = _req$connection.remotePort;
return {
method: method,
url: url,
headers: headers,
remoteAddress: remoteAddress,
remotePort: remotePort
};
} // serializer to pull useful fields from the res object
function resSerializer(res) {
if (!res || !res.statusCode) {
return res;
}
return {
statusCode: res.statusCode,
header: res._header
};
} // create default logger instance
var Logger = _bunyan["default"].createLogger({
name: process.env.APP_NAME || 'API',
streams: streams
streams: streams,
serializers: {
req: reqSerializer,
res: resSerializer,
error: _bunyan["default"].stdSerializers.err,
err: _bunyan["default"].stdSerializers.err
}
});

@@ -40,0 +79,0 @@

17

package.json
{
"name": "@coast/logger",
"version": "1.1.0",
"version": "1.2.0",
"description": "A Node/browser application logger",

@@ -23,12 +23,12 @@ "main": "./dist/main.js",

"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.4",
"@babel/preset-env": "^7.5.4",
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-eslint": "^10.0.2",
"eslint": "^6.0.1",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.2",
"lodash": "^4.17.14",
"eslint-plugin-react": "^7.14.3",
"lodash": "^4.17.15",
"rimraf": "^2.6.3",

@@ -52,2 +52,3 @@ "semantic-release": "^15.13.18",

"comma-dangle": ["error", "never"],
"no-underscore-dangle": 0,
"object-curly-newline": ["error", {

@@ -54,0 +55,0 @@ "ObjectExpression": { "multiline": true },

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