Closed coryasilva closed 8 years ago
Where are you seeing large chunks of JSON in your BugLogHQ reports? I pass a structure of information for the ExtraInfo argument, but even that is represented fine with a CFDump. I don't see the need.
@atuttle agreed
Unless the report is not coming from the BugLogHQ client cfc. In that case I can see how someone may just sent a JSON blob on the HTMLReport field (possibly).
But like the others said, maybe a better description of your use case may help illustrate better what would be the benefit or where it would be used.
On Tue, Mar 3, 2015 at 6:04 AM, Derek notifications@github.com wrote:
@atuttle https://github.com/atuttle agreed
— Reply to this email directly or view it on GitHub https://github.com/oarevalo/BugLogHQ/issues/119#issuecomment-76950418.
Oscar Arevalo http://about.me/oarevalo http://www.coldbricks.com - Content Management System http://www.oscararevalo.com - My Blog
@atuttle Yeah I was thinking this may be an edge case, I am just jealous about how good the CFDump looks.
@oarevalo is right I am abusing BugLogHQ for use with a our AngularJs single page app. We hold our "session" data in the $rootScope. When there is an error I would like to dump the $rootScope (and possibly some services to).
Currently I am refactoring the BugLogHq-AngularJs Module
I was thinking it may be nice to also do syntax highlighting on cfml and sql too. But that is not a tremendous improvement but could just look nice.
@coryasilva that's not abusing it :) At my job we have BugLogHQ happily listening to Ruby and Python apps, as well as CF
Makes sense from a technical standpoint. We're in a line of work where using the most suitable tool for the job is key and a lof of simple stuff doesn't require the overhead of a CFML server when a Node.js app will do just fine.
@oarevalo, you know I'm lazy. How about an optional interface parameter that's by default false and if it's set to true, the parser in the BugLog core application will perform an isJSON()
check on the extra data and pump it through a glorified saveContent variable="extraData" { writeDump( extraData ) }
if it is?
After a second look over our bug reporting I found a way around this by using the HTML report. I just formatted the json with some "/n/r" and spaces and nested it into an html report as a string. This proved to be a lot easier although a little more chatty... incentive to write code without bugs!
https://github.com/coryasilva/BugLogHQ/blob/master/client/bugLogClientAngular.js#L100-L112
Consider viewing JSON as seen in this example: http://jsonformatter.curiousconcept.com/