Skip to content
This repository has been archived by the owner on Apr 27, 2018. It is now read-only.

Latest commit

 

History

History
25 lines (15 loc) · 1.06 KB

README.md

File metadata and controls

25 lines (15 loc) · 1.06 KB

sails-hook-requestlogger

Note: Requires Sails.js version >=0.11.0-rc

Sails JS hook to activate morgan request logging for yoursails app.

Installation

npm install sails-hook-requestlogger

Usage

Just lift your app as normal and all your server requests will be logged, with useful information such as response-time, straight to your console. As a default it is activated in your dev environment but deactivated in production.

Configuration

By default, configuration lives in sails.config.requestlogger.

Parameter Type Details
format ((string)) Defines which logging format to use. Deaults to dev.
inDevelopment ((boolean)) Whether or not to log requests in development environment. Defaults to true.
inProduction ((boolean)) Whether or not to log requests in production environment Defaults to false.

That’s it!