You can also use log4j.

http://wiki.python.org/jython/JythonMonthly/Articles/August2006/1

On 5/28/07, Utkarsh Upadhyay <musically.ut@gmail.com> wrote:
Hi,

There's a fairly simple way to do it, it seems:

testfile.py
============================
for i in range(999):
        try:
                print int(str(i)+"causes an exception")
        except ValueError, error:
                print 'Got an error ', error
=============================

C:\>jython testfile.py > errors.txt

That saves all errors/output into the erros.txt file.
However, this does NOT work quite right:

c:\>jython -Dpython.verbose=debug testfile.py > errors.txt

As it will still output the jython debug reports to the command prompt.

HTH,
musically_ut

On 5/24/07, astigmatik@gmail.com <astigmatik@gmail.com> wrote:
> I'm using Jython2.2b2 on WinXP. How do I log all the errors that show
> up in the "DOS" window to file? I don't want to get rid of it. I just
> want to be able to log everything because sometimes, I get many error
> messages and I can't  scroll up the DOS window so I can't track down
> what caused the error.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Jython-users mailing list
> Jython-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>


--
Never trust a spiritual leader who cannot dance. ~Mr. Miyagi, The Next
Karate Kid

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users