Skip to content

monk-middlewares/monk-middleware-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Debugging

To get some information on what monk is doing, use the monk-middleware-debug:

npm install --save monk-middleware-debug
db.addMiddleware(require('monk-middleware-debug'))
  • If you wish to see what queries monk passes to the driver, simply leverage debug:

    DEBUG="monk:queries" npm start
  • To see all debugging output from monk:

    DEBUG="monk:*" npm start
  • You can also see the output from the mongo driver using debug:

    DEBUG="mongo:*" npm start

    There are several separated features available on this namespace:

    • Db: The Db instance log statements
    • Server: A server instance (either standalone, a mongos or replicaset member)
    • ReplSet: Replicaset related log statements
    • Mongos: Mongos related log statements
    • Cursor: Cursor log statements
    • Pool: Connection Pool specific log statements
    • Connection: Singular connection specific log statements
    • Ping: Replicaset ping inquiry log statements

    To see the output of only one of those features:

    DEBUG="mongo:Cursor" npm start // will only print the Cursor log statements

About

A monk middleware to show debug logs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published