Home arrow static arrow Java Programming [Archive] - writing log file
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - writing log file
This topic has 2 replies on 1 page.

Posts:64
Registered: 12/23/03
writing log file  
Aug 2, 2004 4:51 AM



 
i want on every exception that occures to write a Log file how do i do that?
thnaks in advance
peleg
 

Posts:569
Registered: 8/8/01
Re: writing log file  
Aug 2, 2004 5:01 AM (reply 1 of 2)



 
There are different ways:
1. use the internal logger of the JDK - java.util.logging
2. use an external logger, like log4j or jtrace
3. redirect System.err or System.out to a FileWriter and when an exceptions occurs, just write it to System.err or System.out (it's a **** dirty way)

regards
 

Posts:5,904
Registered: 04/03/99
Re: writing log file  
Aug 2, 2004 5:28 AM (reply 2 of 2)



 
http://javaalmanac.com/egs/java.util.logging/pkg.html
 
This topic has 2 replies on 1 page.