Not sure which logging library you are using, but I assume you are using the standard java logging api (package java.util.logging) ...
You probably do not see this because you are using the DEBUG registration level and your project is set to print WARNING and higher than I assume. Therefore, if you want to quickly see what happens, either temporarily change the code:
if (user != null) { log.severe("Usuario identificado: " + user.getIdUsuario() + "obteniendo su cuadro de mandos");
OR create a logging.properties file in the project root directory, where you enable logging at the DEBUG level for the class or package for which you want to view the logs:
com.mycompany.mypackgepath.myclass.level=DEBUG
Please note that your project may already have such a file. You can also add more handlers to print log output in a file as well as in the netbeans console
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=ALL java.util.logging.FileHandler.pattern = %h/Library/Logs/xd%g-%u.log java.util.logging.FileHandler.limit = 10485760 java.util.logging.FileHandler.count = 2 java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.FileHandler.encoding = UTF8
You might want to check out this tutorial, for example: http://www.javapractices.com/topic/TopicAction.do?Id=143
Btw. the registrar must be private and final ;)
source share