Improve JS debugging support for dust #137

Closed
vybs opened this Issue Sep 6, 2012 · 6 comments

Comments

Projects
None yet
4 participants
Contributor

vybs commented Sep 6, 2012

@ghost ghost assigned smfoote and jimmyhchan Feb 21, 2013

Contributor

vybs commented Feb 21, 2013

related ticket :#107

Contributor

vybs commented Feb 21, 2013

From Jimmy
https://github.com/jimmyhchan/dustjs/blob/debugger/lib/dust.js

we should use console.log / console.info and console.error.
Nice to have would be to console = require('./logger') somewhere so that we could swap from browser console to node console to v8 console

Contributor

prashn64 commented Feb 26, 2013

As per discussion with Jimmy:

We will have a similar implementation to the Handlebars.js debugger. We will implement our own log function which will have 4 levels: debug, info, warn, error. Errors from the server will be fed through this log function with the appropriate levels. In order to do this, it would be useful to have a context called errors or something similar to be passed from the server, which contains all errors including the level of that error. We can then dump this context in a pretty way to an alert when the page loads or appended to the bottom of the page. Errors from client can be appended below the server errors. Disambiguation between the two types of errors(server and client) may be helpful in the output.

A minimum error level will be set whereby any 'error' below that level will not be output. On production, the minimum error level will be set above the maximum level, so nothing will be output.

Contributor

prashn64 commented Mar 12, 2013

In addition, it may be best to put the errors in the errors parameter of dust.render's callback. Currently, the only error that is added there is for template not found.

Contributor

prashn64 commented Mar 12, 2013

Client Side Scoping:

Logging API: 2-3 weeks
Connect to errors object: 1-2 weeks
Log client side dust errors: 1 week
Adding errors from "server" with Mock JSON: 1 week

Contributor

vybs commented Apr 14, 2013

similar to #244

@prashn64 prashn64 closed this Oct 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment