Forum Discussion
jeffrey_crowley
12 years agoContributor
Have you considered creating a wrapper function that writes a string to a text file along with writing to the log? That way you don't have to write a tool to extract certain messages. I use something like the (untested) code below to dump a CSV-like file that I import into Excel. My scenario is that I'm testing ~800 products and doing 40k+ validations. Searching through the logs is too time consuming so I export a text file, load it into Excel, and then I can filter down to only the failures, etc. for easier investigation and bug entry. I just attach the resulting Excel sheet with all the failures.
function LogMessage(msg)
{
WriteMessage(msg);
Log.Message(msg);
}
function WriteMessage(msg)
{
// simple example to give you an idea of how writing to a text file would work from an automation script
var filePath = "c:\log.txt";
// look up documentation on WriteToTextFile() for more details
aqFile.WriteToTextFile(filePath, msg, aqFile.ctANSI, true);
}