File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes How to activate Realm logs in Tomcat 5.5 / 6 ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to activate Realm logs in Tomcat 5.5 / 6 ?" Watch "How to activate Realm logs in Tomcat 5.5 / 6 ?" New topic
Author

How to activate Realm logs in Tomcat 5.5 / 6 ?

sylvain caillet
Greenhorn

Joined: Jan 15, 2010
Posts: 3
Hi !

I use JDBC realm with a form to manage my web portal's accesses. But for debugging purpose, I would like to activate the logs of Realm authenticate processes.

To be more precise : If you have a look to the RealmBase.java class, it begins by getting a Log object from a LogFactory. And then it writes many interesting debugging informations to it. But how to activate this log file ?

Thank you all for your help,

Best regards,

Sylvain Caillet
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

The log goes to the Tomcat log. There's an extensive (and confusing) section in the Tomcat docs on this log, but I believe that by default it just routes to catalina.out.


Customer surveys are for companies who didn't pay proper attention to begin with.
sylvain caillet
Greenhorn

Joined: Jan 15, 2010
Posts: 3
Thank you Tim for your reply,

I have tried many things in the server.xml (activate some valves), in the logging.properties but anyway, always unable to get any log from the Realm, even in the catalina.out.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

sylvain caillet wrote:Thank you Tim for your reply,

I have tried many things in the server.xml (activate some valves), in the logging.properties but anyway, always unable to get any log from the Realm, even in the catalina.out.


Have you set up logging in the logging.properties file for the java.util.logging facilitiy of the JVM? In particular, have you set up the minimum reported loglevel to one of the more detailed levels like FINER? You have to do this in 2 places - once for logging in general, and once for the log destination. That's because you can have multiple log destinations and not all of them may need to receive debugging messages.
sylvain caillet
Greenhorn

Joined: Jan 15, 2010
Posts: 3
Thank you Tim. You were right. FINEST was the good level.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to activate Realm logs in Tomcat 5.5 / 6 ?