logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sneha Nikum" <snehani...@gmail.com>
Subject Re: Help needed with log4j used with JBOSS server
Date Wed, 23 Jan 2008 05:22:06 GMT
Hi Ruchi,
     I will surely try this out. But am yet not sure if this is going to
work, because the problem here is that the .property file that I have
written is simply not used. Its using the .property file that  is in the
<JBOSS_HOME>server\default\conf directory. The log4j.xml file is being used.
   But anyways wil give this a try. Thanks for the prompt reply

Thanks and Regards
 --
Sneha Anil Nikum
Don't get even with people
get AHEAD of them!


On Jan 23, 2008 10:44 AM, Ruchi Mishra <ruchi.m@zensar.com> wrote:

> Hi Sneha,
>
> What you can do is create a log4jinitServlet class and in that servlet
> configure the path of your properties file.
> This servlet need to be mapped in your web.xml file.
>
> regards
> Ruchi
>
>
>
>
>
>
>
> ________________________________
>
> From: Sneha Nikum [mailto:snehanikum@gmail.com]
> Sent: Wednesday, January 23, 2008 10:38 AM
> To: log4j-user@logging.apache.org
> Subject: Help needed with log4j used with JBOSS server
>
>
> Hi,
>      I am Sneha, I am working on creating a hosted service, and using
> log4j for logging purpose. I am new to it.
>     I am trying to log the details to a log file, using a .properties
> file. I have placed this file into the WEB-INF->classes directory.
> But yet, after I run the project, the log file is not getting created,
> the logs are going into the server.log file of JBOSS. I think this
> problem has something to do with the class loaders. As JBOSS also has
> its own log4j.jar .
>
>    I have attached with this mail the property file.
>   Also in the main code,
> I create an instance of the Logger class as below:
> static
> Logger logger = Logger.getLogger("MyLogger" );
> And also within each fuction configure the properties as:
> PropertyConfigurator.configure("logger.properties");
> Can you please help me with this problem? If this is not the right place
> to mail my doubts, can you please point me towards the right person?
> Waiting for your reply.
>
> Thanks and Regards
>
> --
> Sneha Anil Nikum
> Don't get even with people
> get AHEAD of them!
>
>
> DISCLAIMER:
> This email may contain confidential or privileged information for the
> intended recipient(s) and the views expressed in the same are not
> necessarily the views of Zensar Technologies Ltd. If you are not the
> intended recipient or have received this e-mail by error, its use is
> strictly prohibited, please delete the e-mail and notify the sender. Zensar
> Technologies Ltd. does not accept any liability for virus infected mails.
>



-- 
Sneha Anil Nikum
Don't get even with people
get AHEAD of them!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message