This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 10441
    
176

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.
 
Have you checked out Aspose?
 
subject: Creating logfiles for different services (Log4j)
 
It's not a secret anymore!