jsreport extension collecting and serving logs
Clone or download
Latest commit a9f2eaf Dec 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib add some defensive code to skip requests without logs Sep 6, 2018
studio ignore studio build files again May 8, 2018
test fix lint Sep 6, 2018
.eslintrc migrate to new studio Jun 13, 2016
.gitignore ignore studio build files again May 8, 2018
.npmrc migrate to new studio Jun 13, 2016
.travis.yml refactor to the node v 8 Feb 2, 2018
LICENSE Initial commit Feb 12, 2016
README.md fix formatting Mar 21, 2017
index.js initial commit Feb 12, 2016
jsreport.config.js add optionsSchema Apr 19, 2018
package-lock.json update dev deps Dec 7, 2018
package.json update dev deps Dec 7, 2018

README.md

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