I have set my logging.properties
with the following and restarted tomcat:
com.example.handler.level = FINEST
And I have a method of:
public SearchHistoryItem getSearchHistoryItem(Api1 api1, String stringId, String resultId) {
SearchHistoryItem item = api1.getSearchHistoryDetails(stringId, resultId);
Level level = logger.getLevel();
logger.log(Level.INFO, "Log level is: " + level);
logger.log(Level.FINEST, "item is: " + item);
return item;
}
And a return of the following:
13-Dec-2016 18:32:53.093 INFO [ajp-nio-127.0.0.1-8009-exec-4] com.example.handler.SomeHandler.getSearchHistoryItem Log level is: FINEST
If you note. The first log message prints what I am looking for. So I see that logging is indeed FINEST
, and I see that log messages are being written. But I don't see the second log message ever print. Is there something other than setting the level in the properties file that I need to worry about?
UPDATE
I am using java.util.logging.Logger
with default configurations as far as I can see.
UPDATE
I have been playing with this more and it seems that if I change to Level.FINE
they will log. Perhaps there is something somewhere filtering out logs that are to high?