2012/5/17  <oh...@cox.net>:
> Hi,
>
> I'm trying to debug some problems while enabling JNDIRealm in Tomcat 6.0.33.
>
> I've gotten Tomcat itself to output debug logging, but looking at the 
> JNDIRealm.java code, e.g.:
>
> http://www.docjar.com/html/api/org/apache/catalina/realm/JNDIRealm.java.html
>
> It looks like there's a bunch of debug output that the Java code *can* output.
>
> The problem is that I don't know how to enable that debug output/logging?
>
> I'm assuming that something needs to be added to the Tomcat 
> logging.properties, but can anyone tell me what that should be to get the 
> messages such as would be output by the following code in JNDIRealm.java:
>
> 1044           if (username == null || username.equals("")
>  1045               || credentials == null || credentials.equals("")) {
>  1046               if (containerLog.isDebugEnabled())
>  1047                   containerLog.debug("username null or empty: returning 
> null principal.");
>  1048               return (null);
>


See
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Servlets_logging_API

The "containerLog" writes to a category that has name similar to the following:
org.apache.catalina.core.ContainerBase.[${engine}].[${host}].[${context}]

If your realm in in Context, then you will get the full name.
If it is in Host, you will get [engine][host] only,
and so on.


You may also want to run under debugger,
http://wiki.apache.org/tomcat/FAQ/Developing#Debugging

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to