This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging Dilemma

 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic