Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Problem with Eclipse, Tomcat Plug and Apache Commons Logging w/ Log4J
Problem with Eclipse, Tomcat Plug and Apache Commons Logging w/ Log4J [message #53546] Mon, 09 June 2003 19:35 Go to next message
Jeff Duska is currently offline Jeff DuskaFriend
Messages: 71
Registered: July 2009
Member
I'm having problems with the tomcat plugin, tomcat and Apache Commons
loggins. I am debugging my project using the Apache Common Log API to
work with Log4J. I upgraded my copy of Tomcat to 4.1.24. Now, I when I
start Tomcat via the plugin, Tomcat always starts in debug mode! It
doesn't matter what I have selected in the Window | Preferences | Tomcat
| Don't run Tomcat in debug mode. It is my understanding that Tomcat is
now using Apache Commons API. This is causing the Tomcat is getting
confused with my log4j settings. The only suggestion I have found is to
turn off my debugging in my log4j files. Since I'm using log4j to help
me find my bugs, I don't want to turn it off.

The other options is to get Tomcat to use the correct log setting, but I
have found not explaination to track down this problem.

Do you have suggestions on how I can correct this problem.
Re: Problem with Eclipse, Tomcat Plug and Apache Commons Logging w/ Log4J [message #54040 is a reply to message #53546] Wed, 11 June 2003 04:16 Go to previous message
Eclipse UserFriend
Originally posted by: ed.burnette.REMOVE.THIS.sas.com

We ran into the same problem:

"Tomcat logging

Recent versions of Tomcat use another Apache component, Commons Logging, to
provide logging services. This component is a wrapper that provides a single
interface
supporting different loggers, such as log4j. The wrapper locates a logging
API
through a somewhat complicated discovery process at runtime. If it finds the
log4j
configuration file that you created in chapter 3, you'll discover that
Tomcat logs
a lot of debug information in the Eclipse console view and takes a long time
to
start up.

You have two options to bring logging under control. The first is to
continue
to let Tomcat use your log4j configuration file, but to increase the logging
threshold to filter out the numerous debug messages. To do this, open the
file
log4j.properties file in the bin folder under the Persistence project and
change
DEBUG in the second line to INFO, as follows:

# Assign two appenders to root logger
log4j.rootLogger=INFO, myConsole, myLogFile

The second option is to configure the Commons Logging component to use a
different logger (or a different instance of log4j) than your Persistence
component.
You can find out more about this technique at the Apache web site."
-- chapter 7, Eclipse in Action


I went to the Apache web site and found:
http://jakarta.apache.org/commons/logging/api/index.html
Look under the package description and you'll find some info on the
org.apache.commons.logging.Log property. I haven't tried it but it looks
like you can set that to the name of a log class such as
org.apache.commons.logging.impl.NoOpLog .

Hope this helps.
--
Ed Burnette, co-author Eclipse in Action (www.manning.com/gallardo)


"Jeff Duska" <Jeff.Duska@noaa.gov> wrote in message
news:3EE4E19F.F4AD4DC4@noaa.gov...
>
> I'm having problems with the tomcat plugin, tomcat and Apache Commons
> loggins. I am debugging my project using the Apache Common Log API to
> work with Log4J. I upgraded my copy of Tomcat to 4.1.24. Now, I when I
> start Tomcat via the plugin, Tomcat always starts in debug mode! It
> doesn't matter what I have selected in the Window | Preferences | Tomcat
> | Don't run Tomcat in debug mode. It is my understanding that Tomcat is
> now using Apache Commons API. This is causing the Tomcat is getting
> confused with my log4j settings. The only suggestion I have found is to
> turn off my debugging in my log4j files. Since I'm using log4j to help
> me find my bugs, I don't want to turn it off.
>
> The other options is to get Tomcat to use the correct log setting, but I
> have found not explaination to track down this problem.
>
> Do you have suggestions on how I can correct this problem.
>
>
Previous Topic:Problem debugging with attached source in 2.1
Next Topic:Text Editor - How it works
Goto Forum:
  


Current Time: Thu Dec 26 13:15:50 GMT 2024

Powered by FUDForum. Page generated in 0.03054 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top