Socket
Socket
Sign inDemoInstall

koa-logger

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-logger - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

23

index.js

@@ -48,3 +48,3 @@

return function printFunc (...args) {
let str = util.format(...args)
const str = util.format(...args)
if (transporter) {

@@ -60,8 +60,8 @@ transporter(str, args)

// request
const start = Date.now()
const start = ctx[Symbol.for('request-received.startTime')] ? ctx[Symbol.for('request-received.startTime')].getTime() : Date.now()
print(' ' + chalk.gray('<--') +
' ' + chalk.bold('%s') +
' ' + chalk.gray('%s'),
ctx.method,
ctx.originalUrl)
ctx.method,
ctx.originalUrl)

@@ -118,3 +118,4 @@ try {

const s = status / 100 | 0
const color = colorCodes.hasOwnProperty(s) ? colorCodes[s] : 0
// eslint-disable-next-line
const color = colorCodes.hasOwnProperty(s) ? colorCodes[s] : colorCodes[0]

@@ -133,3 +134,3 @@ // get the human readable response length

: event === 'close' ? chalk.yellow('-x-')
: chalk.gray('-->')
: chalk.gray('-->')

@@ -142,7 +143,7 @@ print(' ' + upstream +

' ' + chalk.gray('%s'),
ctx.method,
ctx.originalUrl,
status,
time(start),
length)
ctx.method,
ctx.originalUrl,
status,
time(start),
length)
}

@@ -149,0 +150,0 @@

@@ -5,3 +5,3 @@ {

"repository": "koajs/logger",
"version": "3.2.0",
"version": "3.2.1",
"keywords": [

@@ -18,24 +18,25 @@ "koa",

"lint": "eslint --fix .",
"test": "mocha test.js"
"test": "mocha test.js --exit"
},
"devDependencies": {
"boom": "^5.2.0",
"chai": "^3.5.0",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^4.2.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"koa": "^2.0.0-alpha.7",
"boom": "^7.3.0",
"chai": "^4.2.0",
"eslint": "^6.0.1",
"eslint-config-standard": "^13.0.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"koa": "^2.7.0",
"koa-compress": "^3.0.0",
"koa-route": "^3.2.0",
"mocha": "^3.2.0",
"sinon": "^1.17.7",
"sinon-chai": "^2.8.0",
"supertest": "^2.0.1"
"mocha": "^6.1.4",
"sinon": "^7.3.2",
"sinon-chai": "^3.3.0",
"supertest": "^4.0.2"
},
"license": "MIT",
"dependencies": {
"bytes": "^2.5.0",
"chalk": "^1.1.3",
"bytes": "^3.1.0",
"chalk": "^2.4.2",
"humanize-number": "0.0.2",

@@ -42,0 +43,0 @@ "passthrough-counter": "^1.0.0"

@@ -7,3 +7,3 @@

Development style logger middleware for [koa](https://github.com/koajs/koa).
Development style logger middleware for [koa](https://github.com/koajs/koa). Compatible with [request-received](https://github.com/cabinjs/request-received).

@@ -10,0 +10,0 @@ ___Notice: `koa-logger@2` supports `koa@2`; if you want to use this module with `koa@1`, please use `koa-logger@1`.___

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc