Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j Output to Console and File

 
JLS Steff
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic