Solved

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

Posted on 2003-11-04
7
379 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
This article describes how to reset your Windows 10 password when you've forgotten it.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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