File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
jQuery in Action, 2nd edition
 
subject: log4j Output to Console and File