aspose 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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j Output to Console and File
 
Similar Threads
logging
Not able to save logs into .log file
setting log4j
Log4j rolling policy must be declared?
log files