Hello
I have recently started playing with log4j. Does
anybody know if it can be used with Tomcat?
I have a a JSP app running on tomcat that has several
beans and classes and was wondering if I could use
log4j as a logging tool
J
_
I'm deploying a war file using tomcat and I wish to use Apache's common
logging api to log things (log4j behind the scenes).
For some reason my configuration file seems to be getting ignored but my
log.info msgs are showing up in the console window for Tomcat.
Can someone tell me why this is happ
Hello there!
I was wondering if anybody could help with a tomcat
and log4j problem?
I have placed my log4j.properties file into my
WEB-INF/classes direcotry but it seems that Tomcat is
not picking it up!
This is the line in my code in my .java file taht
tells me what .properties file to look fo
You can try the following:
String propPath =
conf.getServletContext().getResource("/WEB-INF/classes/log4j.properties");
PropertyConfigurator.configure(propPath);
...
regards
Winfried
>
> Hello there!
>
> I was wondering if anybody could help with a tomcat
> and log4j problem?
>
> I hav
Oops, correcting...
String propPath =
conf.getServletContext().getResource("/WEB-INF/classes/log4j.properties").getPath();
PropertyConfigurator.configure(propPath);
...
Yes it can.
You might want to consider creating a log4j.properties file to hold your log4j
configuration. Have that file in your WEB-INF/classes dir and tomcat would
automatically pick it up.
HTH.
Anuj.
teh j wrote:
> I have recently started playing with log4j. Does
> anybody know if it can b
ednesday, February 12, 2003 3:23 PM
Subject: Log4J and tomcat
> I'm deploying a war file using tomcat and I wish to use Apache's common
> logging api to log things (log4j behind the scenes).
>
> For some reason my configuration file seems to be getting ignored but my
&g
PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 12:57 PM
Subject: Re: Log4J and tomcat
> Sloan, sorry can't help you out but if you find a solution I'd be
interested
> in how you came up with the fix... Learnin about
AIL PROTECTED]]
>Sent: Thursday, February 13, 2003 1:03 PM
>To: Tomcat Users List
>Subject: Re: Log4J and tomcat
>
>I'll keep you posted if I ever figure something out.
>
>The problem prob. is that since the common-logging and log4j use a lot
of
>static objects I'm g
]]
Sent: Wednesday, February 12, 2003 3:23 PM
To: [EMAIL PROTECTED]
Subject: Log4J and tomcat
I'm deploying a war file using tomcat and I wish to use Apache's common
logging api to log things (log4j behind the scenes).
For some reason my configuration file seems to be getting ignored but m
extract it from the jar and put it somewhere...
- Original Message -
From: "Ron Day" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 1:15 PM
Subject: RE: Log4J and tomcat
> Try putting log4j.jar in your W
le.
HTH,
Matt
> -Original Message-
> From: Sloan Seaman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 11:03 AM
> To: Tomcat Users List
> Subject: Re: Log4J and tomcat
>
>
> I'll keep you posted if I ever figure something out.
>
> The problem prob.
Does anybody know of a Log4j and Tomcat HOWTO? I've seen lots of info out
there on Log4j and command line Java but little on Log4j in a Tomcat
container. I'd like to see sample
Hello,
This is sure a newbie question, but I have been having a lot of
trouble trying to get logging to work on tomcat 5.5 with log4j.
I got everything working (I think...) but I have been wondering about
something...
Would anybody know why I still have to put a copy of
commons-logging.jar + log
on Day" <[EMAIL PROTECTED]>
SS> To: "Tomcat Users List" <[EMAIL PROTECTED]>
SS> Sent: Thursday, February 13, 2003 1:15 PM
SS> Subject: RE: Log4J and tomcat
>> Try putting log4j.jar in your WEB-INF/lib directory, and your log4j.props
SS> in
>> you
a
Millennium ChemInformatics
>-Original Message-
>From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 26, 2003 1:44 PM
>To: [EMAIL PROTECTED]
>Subject: Log4j and Tomcat howto?
>
>
>Does anybody know of a Log4j and Tomcat HOWTO? I've seen lots
nal Message-
> >From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, June 26, 2003 1:44 PM
> >To: [EMAIL PROTECTED]
> >Subject: Log4j and Tomcat howto?
> >
> >
> >Does anybody know of a Log4j and Tomcat HOWTO? I've seen
> lots of info
> ou
Are you trying to enable logging for Tomcat, your webapp, or both? You will
need to add both log4j.jar and commons-logging.jar (not
commons-logging-api.jar) to common/lib to enable Log4j logging for Tomcat-5.5.x
itself. For your own app, do you use actually use the commons-logging api or
just th
On Thu, 9 Dec 2004 16:33:33 -0600, Jacob Kjome <[EMAIL PROTECTED]> wrote:
> Are you trying to enable logging for Tomcat, your webapp, or both? You will
> need to add both log4j.jar and commons-logging.jar (not
> commons-logging-api.jar) to common/lib to enable Log4j logging for
> Tomcat-5.5.x
>
Quoting Marcelo Moreira <[EMAIL PROTECTED]>:
> On Thu, 9 Dec 2004 16:33:33 -0600, Jacob Kjome <[EMAIL PROTECTED]> wrote:
> > Are you trying to enable logging for Tomcat, your webapp, or both? You
> will
> > need to add both log4j.jar and commons-logging.jar (not
> > commons-logging-api.jar) to c
ubject: Re: log4j and tomcat 5.5
Quoting Marcelo Moreira <[EMAIL PROTECTED]>:
> On Thu, 9 Dec 2004 16:33:33 -0600, Jacob Kjome <[EMAIL PROTECTED]> wrote:
> > Are you trying to enable logging for Tomcat, your webapp, or both? You
> will
> > need to add both lo
Hi,
>-Original Message-
>From: Dale, Matt [mailto:[EMAIL PROTECTED]
>Sent: Sunday, December 12, 2004 5:22 PM
>To: Tomcat Users List
>Subject: RE: log4j and tomcat 5.5
>
>> Hopefully I explained things better and piqued your curiosity about
>repostiory
>>
Hi,
Shameless plug accepted, is there somewhere I can download it or do I need to
get it from CVS?
Ta
Matt
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 13 December 2004 14:02
To: Tomcat Users List
Subject: RE: log4j and tomcat 5.5
Hi,
>-Origi
Hi,
>Shameless plug accepted, is there somewhere I can download it or do I
need
>to get it from CVS?
The download page: http://logging.apache.org/site/binindex.html.
Yoav Shapira http://www.yoavshapira.com
This e-mail, including any attachments, is a confidential business
communication, an
ignore that, found the binary download.
Ta
Matt
-Original Message-
From: Dale, Matt
Sent: 13 December 2004 14:37
To: Tomcat Users List
Subject: RE: log4j and tomcat 5.5
Hi,
Shameless plug accepted, is there somewhere I can download it or do I need to
get it from CVS?
Ta
Matt
On Thu, Dec 09, 2004 at 04:33:33PM -0600, Jacob Kjome wrote:
> For your own app, do you use actually use the commons-logging api or
> just the Log4j api? If the latter, don't bother with
> commons-logging. In fact, try to avoid it like the plague.
Could you expand on this? I've wondered i
At 03:17 PM 12/16/2004 -0500, you wrote:
>
>On Thu, Dec 09, 2004 at 04:33:33PM -0600, Jacob Kjome wrote:
>> For your own app, do you use actually use the commons-logging api or
>> just the Log4j api? If the latter, don't bother with
>> commons-logging. In fact, try to avoid it like the plague.
>
charm. Why is that?
Thanks!
- Original Message -
From: "Jacob Kjome" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 2:39 PM
Subject: Re[2]: Log4J and tomcat
> Hello Sloan,
>
> You can remove the
i'm still having a heck of a time getting log4j to
work for my webapp in tomcat...i even looked at the
mailing list archives but nothing really helped...here
is my current configuration (lots of info below):
i have a webapp under:
/%CATALINA_HOME%/webapps/ReportEngine
- This directory basically
rs List
> Subject: RE: Log4J and tomcat
>
>
>
> Howdy,
> FYI: we deploy in packed .war files (and have
> unpackWARs="false" in the
> elements of server.xml). We use log4j with a properties
> configuration file. The way we configure log4j is in a serv
m sure this would prove useful to a large number
of
users.
Many thanks
Jim.
> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
> Sent: 13 February 2003 18:11
> To: Tomcat Users List
> Subject: RE: Log4J and tomcat
>
>
>
> Howdy,
> FYI: w
mailto:[EMAIL PROTECTED]]
> Sent: 14 February 2003 15:40
> To: [EMAIL PROTECTED]
> Subject: RE: Log4J and tomcat using Commons logging
>
>
> Where are your commons-logging and log4j jars?
>
> If they are loaded by a different classloader than the
> log4j.properties
&g
ing to use commons-logging.
Regards
Jim.
> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED]]
> Sent: 14 February 2003 15:40
> To: [EMAIL PROTECTED]
> Subject: RE: Log4J and tomcat using Commons logging
>
>
> Where are your commons-logging an
Sent: 14 February 2003 17:11
> To: [EMAIL PROTECTED]
> Subject: RE: Log4J and tomcat using Commons logging
>
>
> I have never used log4j, but you might try putting the
> log4j.properties
> file in common/classes, it means all apps get the same log
> settings, but
> may w
with my app. With commons-logging you do not log to
any
particular logging implementation.
Regards
Jim.
> -Original Message-
> From: Larry Meadors [mailto:[EMAIL PROTECTED]]
> Sent: 14 February 2003 17:11
> To: [EMAIL PROTECTED]
> Subject: RE: Log4J and tomcat using Com
s Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: February 14, 2003 1:14 PM
To: [EMAIL PROTECTED]
Subject: RE: Log4J and tomcat using Commons logging
Hey Jim,
Can you hel
Regards,
PQ
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: February 14, 2003 1:14 PM
To: [EMAIL PROTECTED]
Subject: RE: Log4J and tomcat using Commons logging
February 2003 18:14
> To: [EMAIL PROTECTED]
> Subject: RE: Log4J and tomcat using Commons logging
>
>
> Hey Jim,
>
> Can you help me understand your configuration so I can help identify
> where the breakdown is? I am most curious about where all the
> jar files
&g
Hey Jim,
I think Yoav's answer is very practical, and in spite of the fact that
it would require a code change if you change loggers down the road, it
is only a few lines in one place. You should think about it, because it
is pretty low-cost, compared to the amount of time we have already
spent. ;
IL PROTECTED]
> Subject: RE: Log4J and tomcat using Commons logging
>
>
> Hey Jim,
>
> I think Yoav's answer is very practical, and in spite of the fact that
> it would require a code change if you change loggers down the road, it
> is only a few lines in one place. You
Howdy,
>Is there a way to tell log4j to use the properties file without relying
>on the class loader, like an environment variable or something? That
>might make it easier to use.
PropertyConfigurator.configure(getServletContext().getResource("/WEB-INF
/config/log4j.properties")); would do the t
October 20, 2003 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: more problems with log4j and tomcat
>
>
> i'm still having a heck of a time getting log4j to
> work for my webapp in tomcat...i even looked at the
> mailing list archives but nothing really helped...here
> is
se' class files go in the
> WEB-INF/classes
> directory.
>
>
>
> > -Original Message-
> > From: El Toro [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 20, 2003 3:55 PM
> > To: [EMAIL PROTECTED]
> > Subject: more problems with
Howdy,
>/%CATALINA_HOME%/webapps/ReportEngine
> - This directory basically contains a set of pretty
>simple jsp's which execute methods from a custom
>data layer.
>/%CATALINA_HOME%/webapps/ReportEngine/WEB-INF/classes
> - my log4j.properties file lives here
>/%CATALINA_HOME%/webapps/Rep
44 matches
Mail list logo