This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes Logging Dilemma Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Logging Dilemma" Watch "Logging Dilemma" New topic
Author

Logging Dilemma

Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
Hi,
I need to use the freemarker templating engine for my app.
But my app uses a homwgrown logging api...
Freemarker supports java logging,log4j,avalon and some other logging api.

My question is that is there any way for me to send logs from say java 1.4 logging api to my logging system.

Thanks,
Chinmay..


The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14117
    
  16

In log4j you can write your own classes that write logging messages somewhere (for example to your own logging system). In Java logging, you can do the same by implementing a java.util.logging.Handler. Lookup the documentation.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging Dilemma