On 2014-10-01 9:47 AM, Josip Maras wrote:
Hi,

How can I log to a file the URL of every page that has started loading? What is 
the best code location to do this. (I understand that this can be easily done 
with a Firefox plugin, but I would like to work directly in the Firefox source 
code).

I was thinking of going with the nsURILoader class, but is there a better 
option?

Also, what is a good built-in option for logging to a custom file, especially 
if this logging will be done fairly frequently.

Thank you,

Josip


When you say page, what do you mean, exactly? Do you care about iframes? You might be interested in nsDocShell::LoadURI.

With respect to logging, I don't know what you mean by built-in option; if this is just for yourself, I would recommend using fopen and fprintf, otherwise you can use the nsIFile interface. Look for uses of InitWithPath for decent examples.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to