node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

jsreport-debug

jsreport-debug

NPM Version Build Status

jsreport extension collecting and serving logs

Installation

npm install jsreport-debug

Usage

Display logs in jsreport studio

debug

Display logs in the response stream

POST: /api/report
BODY:

  { 
     "template": { },    
     "options": { "debug": { "logsToResponse": true } }
  } 

Serve logs in response header

POST: /api/report
BODY:

  { 
     "template": { },    
     "options": { "debug": { "logsToResponseHeader": true } }
  } 

The logs are then serverd in response header Debug-Logs.

Get logs for particular request within node.js

jsreport.render({...}).then(function(response) {
  response.logs
})

jsreport-core

var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-debug')())

License

MIT