aspose file tools
The moose likes Other Open Source Projects and the fly likes How to use Log4j with Swings app? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "How to use Log4j with Swings app?" Watch "How to use Log4j with Swings app?" New topic
Author

How to use Log4j with Swings app?

Rite Sara
Ranch Hand

Joined: Feb 13, 2010
Posts: 56
Hi,

I would like to know more about Log4j. I am building an app with Swings and would like to use Log4j for error logging.
Could any one let me know where to start from or how to go for it ? Please also give links if you know any where I can get the right implementation info.
I searched few sites but didnt understand much since I have never used it before ..


Thanks ..

This message was edited 1 time. Last update was at by Bear Bibeault

Christophe Verré
Marshal

Joined: Nov 24, 2005
Posts: 14361

By Swings, I guess you mean Swing ? The log4j manual gives you enough information to get going.

(Moving your thread to a more appropriate forum)


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
Rite Sara
Ranch Hand

Joined: Feb 13, 2010
Posts: 56
Hi Christopher,

Thanks for the link..it was really helpful . Now I have all basic knowledge of Log 4j.
I am planning to use FileAppender for logging. I want to give log file path dynamically by allowing user to specify where they want to store
the log file for reference through UI.
I am using property file to control logger.

Could you please let me how to configure the property file to accept path dynamically i.e how to set the log file path from inside my class ??


Thanks ..

This message was edited 1 time. Last update was at by Rite Sara

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
The Log4J introduction gives complete details regarding programmatic configuration of Log4J.
Mike Peters
Ranch Hand

Joined: Oct 10, 2009
Posts: 67

Given, you want to log to a file, you may also consider Java's built in logging system.

http://download.oracle.com/javase/6/docs/technotes/guides/logging/index.html


Mike Peters
 
 
subject: How to use Log4j with Swings app?
 
developer file tools