File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating logfiles for different services (Log4j)

 
Gagan Grover
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently not configurable. But you could write your own custom appender (extending the existing ones) to have the behaviour you desire.
 
Gagan Grover
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic