Socket
Socket
Sign inDemoInstall

koa-accesslog

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    koa-accesslog

Middleware for common log format access logs


Version published
Weekly downloads
43
decreased by-4.44%
Maintainers
1
Install size
4.02 MB
Created
Weekly downloads
 

Readme

Source

Accesslog

Output Common Log Format access logs to any stream. Defaults to process.stdout.

Install

# npm ..
npm i koa-accesslog
# yarn ..
yarn add koa-accesslog

Usage

const Koa = require('koa');
const accesslog = require('koa-accesslog');
const app = new Koa();

app.use(accesslog());

Output

127.0.0.1 - - [19/Nov/2014:13:47:37 +0100] "GET / HTTP/1.X" 404 -

Configure

You may configure Accesslog to use any writable stream such as an instance of stream.PassThrough as seen below.

const log = new stream.PassThrough();
app.use(accesslog(log));

License

MIT

Keywords

FAQs

Last updated on 09 Jul 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc