c3p0 logging with tomcat

View: New views
3 Messages — Rating Filter:   Alert me  

c3p0 logging with tomcat

by wardL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm trying to set up c3p0 logging to default system.err. I created a
properties file (mchange-log.properties) and put it in WEB-INF/classes/
with the following configuration parameters:

com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog
com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=ALL

I can't see any logging to the system.err, I only see the following error
log4j:WARN No appenders could be found for logger
(com.mchange.v2.log.MLog).
log4j:WARN Please initialize the log4j system properly.

I think he doesn't recognizes the properties file and switches to
default (log4j).

Somebody had this problem before?

Thanks!
Ward

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
c3p0-users mailing list
c3p0-users@...
https://lists.sourceforge.net/lists/listinfo/c3p0-users

Re: c3p0 logging with tomcat

by Steve Waldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

WEB-INF/classes is may not where you want this (mchange-
log.properties) file. where did you put your c3p0 jar file?

      smiles,
          Steve


On Aug 7, 2009, at 2:42 AM, Ward Loockx wrote:

> Hello,
>
> I'm trying to set up c3p0 logging to default system.err. I created a
> properties file (mchange-log.properties) and put it in WEB-INF/
> classes/
> with the following configuration parameters:
>
> com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog
> com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=ALL
>
> I can't see any logging to the system.err, I only see the following  
> error
> log4j:WARN No appenders could be found for logger
> (com.mchange.v2.log.MLog).
> log4j:WARN Please initialize the log4j system properly.
>
> I think he doesn't recognizes the properties file and switches to
> default (log4j).
>
> Somebody had this problem before?
>
> Thanks!
> Ward
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> c3p0-users mailing list
> c3p0-users@...
> https://lists.sourceforge.net/lists/listinfo/c3p0-users

~oo~
Steve Waldman
swaldman@...




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
c3p0-users mailing list
c3p0-users@...
https://lists.sourceforge.net/lists/listinfo/c3p0-users

Parent Message unknown Re: c3p0 logging with tomcat

by Steve Waldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ok... see...

http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

c3p0 is in the Common classloader, and you've put the logging config  
in "WebappX", where it can't be seen from outside.

i think you might be able to get away with just sticking the config  
file in tomcat6/lib (without having to jar it). from the docs here, it  
looks like it tomcat treats unpacked files as resources for the Common  
classloader.

      smiles,
          steve


On Aug 7, 2009, at 5:49 AM, Ward Loockx wrote:

> Hello Steve,
>
> The jars are located under
>
> /usr/share/tomcat6/lib/c3p0-0.9.1.2.jar
> /usr/share/tomcat6/lib/c3p0-0.9.1.2-jdk1.3.jar
> /usr/share/tomcat6/lib/c3p0-oracle-thin-extras-0.9.1.2.jar
>
>
>
> Steve Waldman schreef:
>> hi,
>>
>> WEB-INF/classes is may not where you want this (mchange-
>> log.properties) file. where did you put your c3p0 jar file?
>>
>>     smiles,
>>         Steve
>>
>>
>> On Aug 7, 2009, at 2:42 AM, Ward Loockx wrote:
>>
>>> Hello,
>>>
>>> I'm trying to set up c3p0 logging to default system.err. I created a
>>> properties file (mchange-log.properties) and put it in WEB-INF/
>>> classes/
>>> with the following configuration parameters:
>>>
>>> com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog
>>> com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=ALL
>>>
>>> I can't see any logging to the system.err, I only see the  
>>> following error
>>> log4j:WARN No appenders could be found for logger
>>> (com.mchange.v2.log.MLog).
>>> log4j:WARN Please initialize the log4j system properly.
>>>
>>> I think he doesn't recognizes the properties file and switches to
>>> default (log4j).
>>>
>>> Somebody had this problem before?
>>>
>>> Thanks!
>>> Ward
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports  
>>> 2008 30-Day
>>> trial. Simplify your report design, integration and deployment -  
>>> and focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> c3p0-users mailing list
>>> c3p0-users@...
>>> https://lists.sourceforge.net/lists/listinfo/c3p0-users
>>
>> ~oo~
>> Steve Waldman
>> swaldman@...
>>
>>
>>

~oo~
Steve Waldman
swaldman@...




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
c3p0-users mailing list
c3p0-users@...
https://lists.sourceforge.net/lists/listinfo/c3p0-users