Programming the Print Log
I know that the Print Log cannot be programmed to save as a file (at least not that I know of) in QTP. But can it be done in UFT? UFT's PL has more features than QTP is asking.
I would want to program this because when QTP crashes and then closes during a run, the print log closes too. So I would periodically have it save.
I use to have a seperate log file so that QTP crashes still we can track down to the issue. On UFT perspective sorry i wat not upgraded still using QTP 11
I think most people only use the Print log for debugging and if you are going to write code to periodically save the print log you may as well spend that effor in writing to an external log IMHO.
Why is that?
Originally Posted by mwsrosso
The function to write info to an external log which can be called from anywhere in your QTP script and func libs will be a similar number of lines of code to the code to extract & save data from the print log. Depending on the format of your log (txt, xml, html) it will be more flexible and manageable than scaping the print log.
A few questions I'm asking myself while I thought about real log v print log:
Can you extract info from the print log from an function lib (I know you can do it from QTP but can you you from qfl or assoc func lib)
How do you ensure you do not get duplicate info when scraping the print log (the only way I know with out researching it is to open & close the print log which is poor)
Why reinvent the wheel and create a print log extraction suite when there are so many examples of logging that I could cop[y and use.
I'm sure the other forum members can chip in here.
My question is why are you seeing QTP crashes so often that this is an issue? I would be reinstalling qtp and such trying to resolve that rather than go down this road.