Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I used to use Perl in APP-over-rides to output debugging information to a file like this:
formatting.evaluateShowString("\"junk\"$^[perl open(TMP, '>>c:/temp/debug.log'); print TMP 'specific-use: " + currentNode.getAttribute("specific-use") + "\n'; close(TMP);]");
This appears to no longer be working. But was pretty "hacky" anyways. Is there a cleaner way of outputting debugging information to a file or log somewhere?
Thanks,
Richard Steadman
Hello Richard, FYI Perl support was removed from Editor a few versions ago.
Bryon
Hi Bryon,
Thanks! My understanding was that it was no longer included by default, but you could add it back in (which we did).
Regards,
Richard
Ok, I sorted it out.
This particular help page shows how to create external log files (or even write to the Styler Event log):
Quick summary:
var log = application.logs[5];
log.open(1, "C:/temp/styler.log");
log.write("Attribute" + currentNode.getAttribute("test") + "\n");
log.close();
var eventLog = application.logs[1];
eventLog.write("test");
