permaculture playing cards*
The moose likes Beginning Java and the fly likes log4j Output to Console and File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "log4j Output to Console and File" Watch "log4j Output to Console and File" New topic
Author

log4j Output to Console and File

JLS Steff
Greenhorn

Joined: Apr 06, 2008
Posts: 3
log4j runs great and builds a log flie.
I want the same log entries to echo to the screen as well as have them written to a file.

I can't find a way to do this.
Manuel DeAngelo
Greenhorn

Joined: Jan 25, 2008
Posts: 13
Just create 2 appenders (1 file, 1 stdout), this should be working fine.

If you need more help, it will be useful to know how you configure log4j (property file, xml file, in Java code).

regards, Manuel
 
Consider Paul's rocket mass heater.
 
subject: log4j Output to Console and File
 
Similar Threads
Not able to save logs into .log file
setting log4j
logging
Log4j rolling policy must be declared?
log files