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

@curveball/accesslog

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curveball/accesslog

Log HTTP requests and responses to STDOUT

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
increased by37.89%
Maintainers
4
Weekly downloads
 
Created
Source

Curveball Access Log

This package is a middleware for Curveball that will automatically log HTTP requests and responses to the console.

Screenshot from 0.2.0

Installation

npm install @curveball/accesslog

Getting started

import accessLog from '@curveball/accesslog';
import { Application } from '@curveball/core';

const app = new Application();
app.use(accessLog());

Blacklisting urls

If you'd like to remove certain urls from the access log, you can filter them out with the 'blacklist' setting.

The default blacklist contains one url: /health, as this is often an endpoint used by load balancers and container orchestrators to see if the service is alive.

To specify an alternative blacklist, just pass a list of strings to the accessLog function.

import accessLog from '@curveball/accesslog';
import { Application } from '@curveball/core';

const app = new Application();
app.use(accessLog({
  blacklist: ['/ignore']
}));

Disabling ANSI colors

If you don't want any color output, it can be disabled entirely with the disableColor option:

import accessLog from '@curveball/accesslog';
import { Application } from '@curveball/core';

const app = new Application();
app.use(accessLog({
  disableColor: true
}));

Keywords

FAQs

Package last updated on 15 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc