How to print debug message in JAAS LoginModule

Kevin P. Foote kpfoote at iup.edu
Thu Dec 13 15:39:52 EST 2012


When ever Im making an add on to the shib-idp I've included the following 

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

And then created my logger 

   /** Class logger. */
    private final Logger log =
LoggerFactory.getLogger(SomethingCool.class);

Then just up the logging in the logging.xml file 

   <!-- Logs @ DEBUG level -->
    <logger name="edu.iup.shib">
        <level value="DEBUG" />
    </logger>


This seems to work for me on all my addons etc.. 

------
thanks
  kevin.foote

On Thu, 13 Dec 2012, Yaowen Tu wrote:

-> Hi,
-> 
-> I am implementing my JAAS LoginModule, and in it I want to log some debug
-> message, but it seems that idp-process.log doesn't contain them.
-> 
-> Here is some sample code:
-> 
-> *private* *static* *final* *Logger* *log* = *LoggerFactory*
-> .getLogger(SampleLoginModule.*class*);
-> 
-> 
-> 
->     @Override
-> 
->     *public* *void* initialize( Subject subject, CallbackHandler
-> callbackHandler, Map<String,?> sharedState, Map<String,?> options )
-> 
->     {
-> 
->         *log*.debug("Start initializing IdapiLoginModule.");
-> 
->         ....
-> 
-> Should I change any configuration in order to make it work?
-> 
-> Thanks,
-> Yaowen
-> 


More information about the users mailing list