Closed pofider closed 7 years ago
yes, i think it is possible, i will give it a look on the weekend 😄
done in v2.3.0
Thank you.
I've tried it. The console.log
is nicely propagated. However the phantom-pdf
recipe still gives us more details. Not sure if this is possible with electron, but it would be great to see this info:
This is demonstrated on this example: https://playground.jsreport.net/studio/workspace/ZJZMyHgm2e/140
In every case please put to the log at the beginning what strategy and what electron version is used. This helps a lot when troubleshooting so we don't have to explicitly ask users.
sure, i will take a look on how to add that information
ok, i've done a little of research and found that electron added new APIs that really facilitates the capture of this information and other things in the implementation. (i'm not sure but maybe with the changes i've made the package could run on iisnode, and maybe this time electron will not take 100% of CPU on windows when using ipc/server strategies (the link points to an older version) 🤔)
these changes are in v2.4.1
🎉 😄
Debug works great in playground now. Thanks!
I didn't check it with iisnode yet, I'm busy with other things, lets see in time...
jsreport includes debug extension which can collect logs associated with particular rendering request and response them back to the caller. This is for example used in combination with phantom-pdf recipe which forwards all the phantomjs messages and also user's
console.log
calls into this log which is usually displayed in the jsreport studio.It would be nice to have the similar functionality in this recipe. Would it be possible?
blog post introducing debug extension http://jsreport.net/blog/debug-extension
writing to request logs https://github.com/jsreport/jsreport-phantom-pdf/blob/master/lib/phantom.js#L159
overriding console https://github.com/pofider/phantom-html-to-pdf/blob/master/lib/scripts/logScriptPart.js