Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 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

28 Experts available now in Live!

Get 1:1 Help Now