Chuck, I agree with your suggestion for the verbose mode output, since
the most relevant information is the URL. Since most people probably use
the console output for debugging via print statements (as I do),
reducing the amount of visual clutter while still retaining the
important information would be a win.
While on the subject of console output, I thought I would share my
method of running WebKit and watching the console output. Since I often
do not have physical access to the machine WebKit is running on, or may
wish to look at the console output from another machine, I have
redirected stdin and stderr in Launch.py to a file. I can then telnet in
to the machine that WebKit is running on and either examine the log file
with a text editor, or watch the output continuously with tail -f.
I did this precisely because I often use print statements for debugging
and these do not seem to be captured by the built in logging facility.
If this functionality exists already I would like to know about it (and
perhaps some documentation should be written to enlighten others on how
to use it), but if not, here is the code I hacked into Launch.py to give
myself this functionality:
In Launch.py, in if __name__ == "__main__":, right above main(sys.argv):
sys.stdout = sys.stderr = open("webkit.log", 'w', 0)
This will give you one webkit console log file, which is written over
each time the application is restarted. This turns out to be sufficient
for my purposes, since I mostly want to be able to tail -f webkit.log to
peek at the running process, but if you think timestamped files would be
more useful for you, here's a line I wrote originally:
sys.stdout = sys.stderr = open("webkit" + reduce(lambda x, y: str(x) +
str(y), time.localtime(time.time())) + ".log", 'w', 0)
You'll have to import time for this to work.
Comments welcome, especially if there is a better way to do this.
Donovan
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel