Solved

How to change the directory for .properties file for Log Tag Library?

Posted on 2003-11-04
7
370 Views
Last Modified: 2010-04-01
I am using the Log Tag Library 1.0 from Jakarta Project. In the initialisation process, it suggest that in order not to have to initialize Log4j, the log4j.properties file will have to be placed in /WEB-INF/classes.

How do I have to do so that I could put the log4j.properties file in /WEB-INF/classes/config

Thank you.
0
Comment
Question by:Tuan_Jean
  • 2
  • 2
7 Comments
 
LVL 3

Accepted Solution

by:
applekanna earned 25 total points
ID: 9683934
in web .xml


<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>com.log.Log4jInit</servlet-class>
<init-param>
<param-name>log4j</param-name>
<param-value>WEB-INF/classes/config/log4j.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

also check this thread,

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20786866.html

Hope this helps.
Cheers!

0
 

Author Comment

by:Tuan_Jean
ID: 9683944
Thank you. That's the same threat I have posted on a slightly different issues.

So, I will have to write a Servlet to initialise it and not able to change the /config directory with just some tag parameter setting?
0
 
LVL 3

Expert Comment

by:applekanna
ID: 9683954
Oops... Soory did not see the author :)

0
 
LVL 6

Expert Comment

by:jarasa
ID: 9778084
Hi.
Log4j is open source, so I suggest you to download the source files and see how is it doint the inicialization process, I don't use this log but I guess it must be the best way to change it.
Javier
0
 

Author Comment

by:Tuan_Jean
ID: 9807328
I created a servlet and it will kick start the application. Thank you.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now