Logger.getAnonymousLogger().log(Level.INFO, "Sending comment");
Logger.getAnonymousLogger().log(Level.INFO, String.format("Logged in: %s", userSessionBean.getUser() != null ? "Yes" : "No"));
Logger.getAnonymousLogger().log(Level.INFO, String.format("Text: %s", commentBackingBean.getText()));
Logger.getAnonymousLogger().log(Level.INFO, String.format("EntryId: %s", commentBackingBean.getEntryId()));
User user = userSessionBean.getUser();
if(user != null){
Logger.getAnonymousLogger().log(Level.INFO, "Creating comment!");
imageManagerBean.createCommentOnImage(user, commentBackingBean.getText(), imageManagerBean.getImage(commentBackingBean.getEntryId()));
}