Taglibs and Commons Logging

2002-12-17 Thread Mark R. Diggory
I'm trying to find the best way to integrate commons-logging into my 
taglibs. Do any of the jakarta taglibraries use the Commons API for 
logging? If so, how do you configure the environment so that the 
appropriate logging facility is picked up and used? I'm struggling to 
get the default be the Simple logger, then other Logging implementations 
be used if availble. But I can't see how to do it simply within the 
taglibary/Jatr for my project.

Any tips would be helpfull,
-Mark


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



Re: Taglibs and Commons Logging

2002-12-17 Thread Mark R. Diggory
I've been attempting this strategy, but it seems that in the web 
application, somehow the properties files in the classes directory don't 
seem to get recognized by commons logging and used. When I compile my 
tags, they get deployed into jars in the WEB-INF /lib directory. I'm 
concerned that the libs endup on the classpath before the properties 
files, I'm wondering if theres a chance that its not searching the whole 
classpath when seaching for the properties files. Am I missing something?

Here's my layout:

/WEB-INF/classes/commons-logging.properties

   org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

/WEB-INF/classes/simplelog.properties

   org.apache.commons.logging.simplelog.defaultlog=trace
   org.apache.commons.logging.simplelog.showdatetime=true

/WEB-INF/lib/commons-logging.jar
/WEB-INF/lib/commons-logging-api.jar
/WEB-INF/lib/mytags.jar

And I don't see any log events in catalina.out for the log.debug(...) 
calls I'm making in my classes.

-Mark

Karr, David wrote:

Struts uses commons-logging.  If you put a commons-logging.properties
file in your WEB-INF/classes directory, with the following contents:

org.apache.commons.logging.Log	=
org.apache.commons.logging.impl.SimpleLog

Then, you can have a file named simplelog.properties in the same
place, with contents like:

org.apache.commons.logging.simplelog.defaultlog	= warn

Other systems using commons-logging will probably work the same way.

 

-Original Message-
From: Mark R. Diggory [mailto:[EMAIL PROTECTED]]

I'm trying to find the best way to integrate commons-logging into my 
taglibs. Do any of the jakarta taglibraries use the Commons API for 
logging? If so, how do you configure the environment so that the 
appropriate logging facility is picked up and used? I'm struggling to 
get the default be the Simple logger, then other Logging 
implementations 
be used if availble. But I can't see how to do it simply within the 
taglibary/Jatr for my project.

Any tips would be helpfull,
-Mark


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

   


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]

 





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Taglibs and Commons Logging

2002-12-17 Thread Mark R. Diggory
Hold on, I made a stupid mistake, my files were named 
commons-logging.properties.properties for some weird reason. It works now.

thanks,
Mark


Mark R. Diggory wrote:

I've been attempting this strategy, but it seems that in the web 
application, somehow the properties files in the classes directory 
don't seem to get recognized by commons logging and used. When I 
compile my tags, they get deployed into jars in the WEB-INF /lib 
directory. I'm concerned that the libs endup on the classpath before 
the properties files, I'm wondering if theres a chance that its not 
searching the whole classpath when seaching for the properties files. 
Am I missing something?

Here's my layout:

/WEB-INF/classes/commons-logging.properties

   
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

/WEB-INF/classes/simplelog.properties

   org.apache.commons.logging.simplelog.defaultlog=trace
   org.apache.commons.logging.simplelog.showdatetime=true

/WEB-INF/lib/commons-logging.jar
/WEB-INF/lib/commons-logging-api.jar
/WEB-INF/lib/mytags.jar

And I don't see any log events in catalina.out for the log.debug(...) 
calls I'm making in my classes.

-Mark

Karr, David wrote:

Struts uses commons-logging.  If you put a commons-logging.properties
file in your WEB-INF/classes directory, with the following contents:

org.apache.commons.logging.Log=
org.apache.commons.logging.impl.SimpleLog

Then, you can have a file named simplelog.properties in the same
place, with contents like:

org.apache.commons.logging.simplelog.defaultlog= warn

Other systems using commons-logging will probably work the same way.

 

-Original Message-
From: Mark R. Diggory [mailto:[EMAIL PROTECTED]]

I'm trying to find the best way to integrate commons-logging into my 
taglibs. Do any of the jakarta taglibraries use the Commons API for 
logging? If so, how do you configure the environment so that the 
appropriate logging facility is picked up and used? I'm struggling 
to get the default be the Simple logger, then other Logging 
implementations be used if availble. But I can't see how to do it 
simply within the taglibary/Jatr for my project.

Any tips would be helpfull,
-Mark


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

  


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

 





--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Taglibs and Commons Logging

2002-12-17 Thread Karr, David
 -Original Message-
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED]]
 
 I've been attempting this strategy, but it seems that in the web 
 application, somehow the properties files in the classes 
 directory don't 
 seem to get recognized by commons logging and used. When I compile my 
 tags, they get deployed into jars in the WEB-INF /lib directory. I'm 
 concerned that the libs endup on the classpath before the properties 
 files, I'm wondering if theres a chance that its not 
 searching the whole 
 classpath when seaching for the properties files. Am I 
 missing something?
 
 Here's my layout:
 
 /WEB-INF/classes/commons-logging.properties
 
 
 org.apache.commons.logging.Log=org.apache.commons.logging.impl
 .SimpleLog
 
 /WEB-INF/classes/simplelog.properties
 
 org.apache.commons.logging.simplelog.defaultlog=trace
 org.apache.commons.logging.simplelog.showdatetime=true
 
 /WEB-INF/lib/commons-logging.jar
 /WEB-INF/lib/commons-logging-api.jar
 /WEB-INF/lib/mytags.jar
 
 And I don't see any log events in catalina.out for the log.debug(...) 
 calls I'm making in my classes.

Well, I would guess there's a good reason for that.  The SimpleLog class
just emits to stderr.  Are you not able to see your server console?

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Taglibs and Commons Logging

2002-12-17 Thread Mark R. Diggory
Karr, David wrote


Well, I would guess there's a good reason for that.  The SimpleLog class
just emits to stderr.  Are you not able to see your server console?
 


I just tail catalina.out usually to track stuff I'm working on. Or I 
build my own log for a particular webapp if there's too much other 
activity going on there. Right now I think that catalina.out is set to 
be where stderr goes by default in a standard tomcat install on Linux, I 
could be wrong.

Thanks for the help, I hope this info is of some help to others too,
Mark


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]