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

@ami-app/adonis-http-logger

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ami-app/adonis-http-logger

Http request logger for AdonisJs

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Adonis Http Logger

Add-on to log your Http requests using Adonis inbuilt logger.

Greenkeeper badge

Add-on to log your Http requests using Adonis inbuilt logger.

Setup

Start by installing it from npm.

adonis install @adonisjs/http-logger

# yarn
adonis install @adonisjs/http-logger --yarn

Register provider

Register the provider inside start/app.js file.

const providers = [
  '@adonisjs/http-logger/providers/LoggerProvider'
]

That's all :)

Config

There is only one config setting, that is to define the environments in which the logger should run.

You have to modify the existing config/app.js file and the following setting.

module.exports = {
  http: {
    loggerEnv: ['development', 'production']
  }
}

By default, it will log in every environment.

Sane defaults

This module will internally make use of AdonisJs Logger provider, which means it will log messages using the default driver.

When json:true config is set. It will log request properties as a JSON object, so that you can easily query over them.

Check the following screenshot when json=true and logs are sent to Loggly.

Keywords

FAQs

Package last updated on 19 Jul 2020

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