File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Creating logfiles for different services (Log4j) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Creating logfiles for different services (Log4j)" Watch "Creating logfiles for different services (Log4j)" New topic
Author

Creating logfiles for different services (Log4j)

Gagan Grover
Greenhorn

Joined: Mar 02, 2007
Posts: 17
I have an application in which i am creating 3 services and i have the following log4j.properties file for the application.


Now, whenever i run these services from their main class all the service log files get generated but i want only the log file for that service should get generated. Can I achieve this thing in the same log4j.properties file or do i need to have separate properties file for each service? Please suggest.


Gags
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9321
    
109

Apparently not configurable. But you could write your own custom appender (extending the existing ones) to have the behaviour you desire.


[My Blog] [JavaRanch Journal]
Gagan Grover
Greenhorn

Joined: Mar 02, 2007
Posts: 17
Jaikiran Pai wrote:Apparently not configurable. But you could write your own custom appender (extending the existing ones) to have the behaviour you desire.


Thanks for your reply, i will try that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating logfiles for different services (Log4j)
 
Similar Threads
max index files for logs not being stored.
Need help with log4j logging tool to log into database
Log4j in Eclipse Vs Log4j Outside Eclipse
question on log4j and eclipse
Using Netbean 6.8 to create a Servlet app that queries a database