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

Sails JS hook to activate morgan request logging for every request

Notifications You must be signed in to change notification settings

artificialio/sails-hook-requestlogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Sails JS hook to activate morgan request logging for every request

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published