
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
koa-http-log
Advanced tools
This module provide a Koa middleware logger that will display HTTP calls on your Koa app.
'use strict'
const Koa = require('koa')
const logger = require('koa-http-log')
const app = new Koa()
app.use(logger())
This example will display logs like this :

You can use options :
// Here are the default options :
const options = {
deactivate: false,
format: ['date', 'method', 'url', 'status', 'responseTime'],
separator: ' - ',
}
app.use(logger(options))
deactivate : Boolean. if true the logger will be inactive. (Default false)format : Array. Determine which fields are displayed in he logs. (Default ['date', 'method', 'url', 'status', 'responseTime'])separator : String. Determine which string is used to separate fields. (default to " - ")date, host, method, url, path, responseTime , status , body
FAQs
Koa request logger
We found that koa-http-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.