Commit 7f929e08 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Consitently use lowercase for logger

Additionally, remove unused loggers.
parent 84116434
......@@ -34,7 +34,7 @@ import java.io.IOException;
*/
public class CASLogoutSuccessHandler implements LogoutSuccessHandler {
public static final Logger LOGGER = LoggerFactory.getLogger(CASLogoutSuccessHandler.class);
public static final Logger logger = LoggerFactory.getLogger(CASLogoutSuccessHandler.class);
private String casUrl;
private String defaultTarget;
......@@ -50,7 +50,7 @@ public class CASLogoutSuccessHandler implements LogoutSuccessHandler {
/* Typo in "referer" intended. It is in the spec. */
String referrer = request.getHeader("referer");
if (response.isCommitted()) {
LOGGER.info("Response has already been committed. Unable to redirect to target");
logger.info("Response has already been committed. Unable to redirect to target");
return;
}
redirectStrategy.sendRedirect(
......
......@@ -56,7 +56,7 @@ public class ImageUtils {
/* default value is 200 pixel in height, set the value in the configuration file */
static final int THUMB_HEIGHT_DEFAULT = 200;
public static final Logger LOGGER = LoggerFactory.getLogger(ImageUtils.class);
public static final Logger logger = LoggerFactory.getLogger(ImageUtils.class);
@Value("${imageupload.thumbnail.width}")
private int thumbWidth = THUMB_WIDTH_DEFAULT;
......@@ -200,7 +200,7 @@ public class ImageUtils {
return result.toString();
} catch (IOException e) {
LOGGER.error(e.getLocalizedMessage());
logger.error(e.getLocalizedMessage());
return null;
}
}
......@@ -248,7 +248,7 @@ public class ImageUtils {
return baos.toByteArray();
} catch (IOException e) {
LOGGER.error(e.getLocalizedMessage());
logger.error(e.getLocalizedMessage());
}
return null;
......
......@@ -17,8 +17,6 @@
*/
package de.thm.arsnova;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
......@@ -40,8 +38,6 @@ public class LoginAuthenticationFailureHandler extends
private final RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
private String failureUrl;
public static final Logger LOGGER = LoggerFactory.getLogger(LoginAuthenticationFailureHandler.class);
@Override
public void onAuthenticationFailure(
final HttpServletRequest request,
......
......@@ -17,8 +17,6 @@
*/
package de.thm.arsnova;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
import javax.servlet.http.HttpServletRequest;
......@@ -33,8 +31,6 @@ public class LoginAuthenticationSucessHandler extends
private String targetUrl;
public static final Logger LOGGER = LoggerFactory.getLogger(LoginAuthenticationSucessHandler.class);
@Override
protected String determineTargetUrl(
final HttpServletRequest request,
......
......@@ -28,8 +28,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -50,8 +48,6 @@ import java.util.List;
@Api(value = "/audiencequestion", description = "the Audience Question API")
public class AudienceQuestionController extends PaginationController {
public static final Logger LOGGER = LoggerFactory.getLogger(AudienceQuestionController.class);
@Autowired
private IQuestionService questionService;
......
......@@ -36,7 +36,7 @@ import java.util.HashMap;
@Controller
@RequestMapping({"/configuration", "/arsnova-config"})
public class ConfigurationController extends AbstractController {
public static final Logger LOGGER = LoggerFactory
public static final Logger logger = LoggerFactory
.getLogger(ConfigurationController.class);
@Value("${api.path:}")
......
......@@ -45,7 +45,7 @@ import java.util.List;
@RestController
public class CourseController extends AbstractController {
public static final Logger LOGGER = LoggerFactory.getLogger(CourseController.class);
public static final Logger logger = LoggerFactory.getLogger(CourseController.class);
@Autowired(required = false)
private ConnectorClient connectorClient;
......
......@@ -43,7 +43,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class FeedbackController extends AbstractController {
public static final Logger LOGGER = LoggerFactory.getLogger(FeedbackController.class);
public static final Logger logger = LoggerFactory.getLogger(FeedbackController.class);
@Autowired
private IFeedbackService feedbackService;
......
......@@ -56,7 +56,7 @@ import java.util.List;
@Api(value = "/lecturerquestion", description = "Operations for Lecture Questions")
public class LecturerQuestionController extends PaginationController {
public static final Logger LOGGER = LoggerFactory.getLogger(LecturerQuestionController.class);
public static final Logger logger = LoggerFactory.getLogger(LecturerQuestionController.class);
@Autowired
private IQuestionService questionService;
......
......@@ -19,8 +19,6 @@ package de.thm.arsnova.controller;
import de.thm.arsnova.services.IQuestionService;
import de.thm.arsnova.web.DeprecatedApi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -34,8 +32,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class LegacyController extends AbstractController {
public static final Logger LOGGER = LoggerFactory.getLogger(LegacyController.class);
@Autowired
private IQuestionService questionService;
......
......@@ -141,7 +141,7 @@ public class LoginController extends AbstractController {
@Autowired
private UserSessionService userSessionService;
public static final Logger LOGGER = LoggerFactory.getLogger(LoginController.class);
public static final Logger logger = LoggerFactory.getLogger(LoginController.class);
@RequestMapping(value = { "/auth/login", "/doLogin" }, method = { RequestMethod.POST, RequestMethod.GET })
public void doLogin(
......@@ -174,7 +174,7 @@ public class LoginController extends AbstractController {
return;
}
} catch (AuthenticationException e) {
LOGGER.info("Authentication failed: {}", e.getMessage());
logger.info("Authentication failed: {}", e.getMessage());
}
userService.increaseFailedLoginCount(addr);
......@@ -197,9 +197,9 @@ public class LoginController extends AbstractController {
return;
}
LOGGER.info("LDAPLOGIN: {}", auth.isAuthenticated());
logger.info("LDAPLOGIN: {}", auth.isAuthenticated());
} catch (AuthenticationException e) {
LOGGER.info("No LDAP login: {}", e);
logger.info("No LDAP login: {}", e);
}
userService.increaseFailedLoginCount(addr);
......
......@@ -25,8 +25,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -49,8 +47,6 @@ import java.util.List;
@Api(value = "/motd", description = "the Motd Controller API")
public class MotdController extends AbstractController {
private static final Logger LOGGER = LoggerFactory.getLogger(MotdController.class);
@Autowired
private IMotdService motdService;
......
......@@ -63,7 +63,7 @@ import java.util.List;
@Api(value = "/session", description = "the Session Controller API")
public class SessionController extends PaginationController {
public static final Logger LOGGER = LoggerFactory.getLogger(SessionController.class);
public static final Logger logger = LoggerFactory.getLogger(SessionController.class);
@Autowired
private ISessionService sessionService;
......
......@@ -57,7 +57,7 @@ public class SocketController extends AbstractController {
@Autowired
private ARSnovaSocket server;
private static final Logger LOGGER = LoggerFactory.getLogger(SocketController.class);
private static final Logger logger = LoggerFactory.getLogger(SocketController.class);
@ApiOperation(value = "requested to assign Websocket session",
nickname = "authorize")
......@@ -70,13 +70,13 @@ public class SocketController extends AbstractController {
public void authorize(@ApiParam(value = "sessionMap", required = true) @RequestBody final Map <String, String> sessionMap, @ApiParam(value = "response", required = true) final HttpServletResponse response) {
String socketid = sessionMap.get("session");
if (null == socketid) {
LOGGER.debug("Expected property 'session' missing");
logger.debug("Expected property 'session' missing");
response.setStatus(HttpStatus.BAD_REQUEST.value());
return;
}
User u = userService.getCurrentUser();
if (null == u) {
LOGGER.debug("Client {} requested to assign Websocket session but has not authenticated", socketid);
logger.debug("Client {} requested to assign Websocket session but has not authenticated", socketid);
response.setStatus(HttpStatus.FORBIDDEN.value());
return;
}
......
......@@ -48,7 +48,7 @@ public class UserController extends AbstractController {
@Autowired
private UserSessionService userSessionService;
public static final Logger LOGGER = LoggerFactory
public static final Logger logger = LoggerFactory
.getLogger(UserController.class);
@RequestMapping(value = "/register", method = RequestMethod.POST)
......
......@@ -27,8 +27,6 @@ import de.thm.arsnova.exceptions.UnauthorizedException;
import org.scribe.up.profile.facebook.FacebookProfile;
import org.scribe.up.profile.google.Google2Profile;
import org.scribe.up.profile.twitter.TwitterProfile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.PermissionEvaluator;
......@@ -43,8 +41,6 @@ import java.util.Arrays;
*/
public class ApplicationPermissionEvaluator implements PermissionEvaluator {
private static final Logger LOGGER = LoggerFactory.getLogger(ApplicationPermissionEvaluator.class);
@Value("${security.admin-accounts}")
private String adminAccounts;
......
......@@ -31,7 +31,7 @@ import java.util.Collection;
* to get a consistent ID despite case insensitivity.
*/
public class CustomLdapUserDetailsMapper extends LdapUserDetailsMapper {
public static final Logger LOGGER = LoggerFactory.getLogger(CustomLdapUserDetailsMapper.class);
public static final Logger logger = LoggerFactory.getLogger(CustomLdapUserDetailsMapper.class);
private String userIdAttr;
......@@ -43,7 +43,7 @@ public class CustomLdapUserDetailsMapper extends LdapUserDetailsMapper {
Collection<? extends GrantedAuthority> authorities) {
String ldapUsername = ctx.getStringAttribute(userIdAttr);
if (ldapUsername == null) {
LOGGER.warn("LDAP attribute {} not set. Falling back to lowercased user provided username.", userIdAttr);
logger.warn("LDAP attribute {} not set. Falling back to lowercased user provided username.", userIdAttr);
ldapUsername = username.toLowerCase();
}
......
......@@ -41,13 +41,13 @@ public class DbUserDetailsService implements UserDetailsService {
@Autowired
private IDatabaseDao dao;
public static final Logger LOGGER = LoggerFactory
public static final Logger logger = LoggerFactory
.getLogger(DbUserDetailsService.class);
@Override
public UserDetails loadUserByUsername(String username) {
String uid = username.toLowerCase();
LOGGER.debug("Load user: " + uid);
logger.debug("Load user: " + uid);
DbUser dbUser = dao.getUser(uid);
if (null == dbUser) {
throw new UsernameNotFoundException("User does not exist.");
......
......@@ -67,7 +67,7 @@ public class QuestionService implements IQuestionService, ApplicationEventPublis
private ApplicationEventPublisher publisher;
public static final Logger LOGGER = LoggerFactory.getLogger(QuestionService.class);
public static final Logger logger = LoggerFactory.getLogger(QuestionService.class);
private HashMap<String, Timer> timerList = new HashMap<>();
......@@ -112,7 +112,7 @@ public class QuestionService implements IQuestionService, ApplicationEventPublis
// base64 adds offset to filesize, formula taken from: http://en.wikipedia.org/wiki/Base64#MIME
final int fileSize = (int) ((question.getImage().length() - 814) / 1.37);
if (fileSize > uploadFileSizeByte) {
LOGGER.error("Could not save file. File is too large with " + fileSize + " Byte.");
logger.error("Could not save file. File is too large with " + fileSize + " Byte.");
throw new BadRequestException();
}
}
......
......@@ -126,12 +126,12 @@ public class SessionService implements ISessionService, ApplicationEventPublishe
private ApplicationEventPublisher publisher;
public static final Logger LOGGER = LoggerFactory.getLogger(SessionService.class);
public static final Logger logger = LoggerFactory.getLogger(SessionService.class);
@Scheduled(fixedDelay = SESSION_INACTIVITY_CHECK_INTERVAL_MS)
public void deleteInactiveSessions() {
if (guestSessionInactivityThresholdDays > 0) {
LOGGER.info("Delete inactive sessions.");
logger.info("Delete inactive sessions.");
long unixTime = System.currentTimeMillis();
long lastActivityBefore = unixTime - guestSessionInactivityThresholdDays * 24 * 60 * 60 * 1000L;
databaseDao.deleteInactiveGuestSessions(lastActivityBefore);
......@@ -141,7 +141,7 @@ public class SessionService implements ISessionService, ApplicationEventPublishe
@Scheduled(fixedDelay = SESSION_INACTIVITY_CHECK_INTERVAL_MS)
public void deleteInactiveVisitedSessionLists() {
if (guestSessionInactivityThresholdDays > 0) {
LOGGER.info("Delete lists of visited session for inactive users.");
logger.info("Delete lists of visited session for inactive users.");
long unixTime = System.currentTimeMillis();
long lastActivityBefore = unixTime - guestSessionInactivityThresholdDays * 24 * 60 * 60 * 1000L;
databaseDao.deleteInactiveGuestVisitedSessionLists(lastActivityBefore);
......@@ -508,7 +508,7 @@ public class SessionService implements ISessionService, ApplicationEventPublishe
// base64 adds offset to filesize, formula taken from: http://en.wikipedia.org/wiki/Base64#MIME
final int fileSize = (int) ((session.getPpLogo().length() - 814) / 1.37);
if (fileSize > uploadFileSizeByte) {
LOGGER.error("Could not save file. File is too large with " + fileSize + " Byte.");
logger.error("Could not save file. File is too large with " + fileSize + " Byte.");
throw new PayloadTooLargeException();
}
}
......
......@@ -88,7 +88,7 @@ public class UserService implements IUserService {
private static final long ACTIVATION_KEY_CHECK_INTERVAL_MS = 30 * 60 * 1000L;
private static final long ACTIVATION_KEY_DURABILITY_MS = 6 * 60 * 60 * 1000L;
public static final Logger LOGGER = LoggerFactory.getLogger(UserService.class);
public static final Logger logger = LoggerFactory.getLogger(UserService.class);
private static final ConcurrentHashMap<UUID, User> socketid2user = new ConcurrentHashMap<>();
......@@ -154,7 +154,7 @@ public class UserService implements IUserService {
@Scheduled(fixedDelay = LOGIN_TRY_RESET_DELAY_MS)
public void resetLoginTries() {
if (loginTries.size() > 0) {
LOGGER.debug("Reset failed login counters.");
logger.debug("Reset failed login counters.");
loginTries.clear();
}
}
......@@ -162,14 +162,14 @@ public class UserService implements IUserService {
@Scheduled(fixedDelay = LOGIN_BAN_RESET_DELAY_MS)
public void resetLoginBans() {
if (loginBans.size() > 0) {
LOGGER.info("Reset temporary login bans.");
logger.info("Reset temporary login bans.");
loginBans.clear();
}
}
@Scheduled(fixedDelay = ACTIVATION_KEY_CHECK_INTERVAL_MS)
public void deleteInactiveUsers() {
LOGGER.info("Delete inactive users.");
logger.info("Delete inactive users.");
long unixTime = System.currentTimeMillis();
long lastActivityBefore = unixTime - ACTIVATION_KEY_DURABILITY_MS;
databaseDao.deleteInactiveUsers(lastActivityBefore);
......@@ -241,7 +241,7 @@ public class UserService implements IUserService {
if (tries < loginTryLimit) {
loginTries.put(addr, ++tries);
if (loginTryLimit == tries) {
LOGGER.info("Temporarily banned {} from login.", new Object[] {addr});
logger.info("Temporarily banned {} from login.", new Object[] {addr});
loginBans.add(addr);
}
}
......@@ -301,7 +301,7 @@ public class UserService implements IUserService {
public void removeUserFromSessionBySocketId(final UUID socketId) {
final User user = socketid2user.get(socketId);
if (null == user) {
LOGGER.warn("null == user for socket {}", socketId);
logger.warn("null == user for socket {}", socketId);
return;
}
......@@ -321,7 +321,7 @@ public class UserService implements IUserService {
@PreDestroy
public void destroy() {
LOGGER.error("Destroy UserService");
logger.error("Destroy UserService");
}
@Override
......@@ -355,13 +355,13 @@ public class UserService implements IUserService {
}
if (null == mailPattern || !mailPattern.matcher(lcUsername).matches()) {
LOGGER.info("User registration failed. {} does not match pattern.", lcUsername);
logger.info("User registration failed. {} does not match pattern.", lcUsername);
return null;
}
if (null != databaseDao.getUser(lcUsername)) {
LOGGER.info("User registration failed. {} already exists.", lcUsername);
logger.info("User registration failed. {} already exists.", lcUsername);
return null;
}
......@@ -376,7 +376,7 @@ public class UserService implements IUserService {
if (null != result) {
sendActivationEmail(result);
} else {
LOGGER.error("User registration failed. {} could not be created.", lcUsername);
logger.error("User registration failed. {} could not be created.", lcUsername);
}
return result;
......@@ -402,7 +402,7 @@ public class UserService implements IUserService {
dbUser.getActivationKey()
);
} catch (UnsupportedEncodingException e1) {
LOGGER.error(e1.getMessage());
logger.error(e1.getMessage());
return;
}
......@@ -429,7 +429,7 @@ public class UserService implements IUserService {
}
mailPattern = Pattern.compile("[a-z0-9._-]+?@(" + StringUtils.join(patterns, "|") + ")", Pattern.CASE_INSENSITIVE);
LOGGER.info("Allowed e-mail addresses (pattern) for registration: " + mailPattern.pattern());
logger.info("Allowed e-mail addresses (pattern) for registration: " + mailPattern.pattern());
}
}
......@@ -465,12 +465,12 @@ public class UserService implements IUserService {
public void initiatePasswordReset(String username) {
DbUser dbUser = getDbUser(username);
if (null == dbUser) {
LOGGER.info("Password reset failed. User {} does not exist.", username);
logger.info("Password reset failed. User {} does not exist.", username);
throw new NotFoundException();
}
if (System.currentTimeMillis() < dbUser.getPasswordResetTime() + REPEATED_PASSWORD_RESET_DELAY_MS) {
LOGGER.info("Password reset failed. The reset delay for User {} is still active.", username);
logger.info("Password reset failed. The reset delay for User {} is still active.", username);
throw new BadRequestException();
}
......@@ -479,7 +479,7 @@ public class UserService implements IUserService {
dbUser.setPasswordResetTime(System.currentTimeMillis());
if (null == databaseDao.createOrUpdateUser(dbUser)) {
LOGGER.error("Password reset failed. {} could not be updated.", username);
logger.error("Password reset failed. {} could not be updated.", username);
}
String resetPasswordUrl;
......@@ -493,7 +493,7 @@ public class UserService implements IUserService {
dbUser.getPasswordResetKey()
);
} catch (UnsupportedEncodingException e1) {
LOGGER.error(e1.getMessage());
logger.error(e1.getMessage());
return;
}
......@@ -504,12 +504,12 @@ public class UserService implements IUserService {
@Override
public boolean resetPassword(DbUser dbUser, String key, String password) {
if (null == key || "".equals(key) || !key.equals(dbUser.getPasswordResetKey())) {
LOGGER.info("Password reset failed. Invalid key provided for User {}.", dbUser.getUsername());
logger.info("Password reset failed. Invalid key provided for User {}.", dbUser.getUsername());
return false;
}
if (System.currentTimeMillis() > dbUser.getPasswordResetTime() + PASSWORD_RESET_KEY_DURABILITY_MS) {
LOGGER.info("Password reset failed. Key provided for User {} is no longer valid.", dbUser.getUsername());
logger.info("Password reset failed. Key provided for User {} is no longer valid.", dbUser.getUsername());
dbUser.setPasswordResetKey(null);
dbUser.setPasswordResetTime(0);
......@@ -521,7 +521,7 @@ public class UserService implements IUserService {
dbUser.setPassword(encodePassword(password));
dbUser.setPasswordResetKey(null);
if (null == updateDbUser(dbUser)) {
LOGGER.error("Password reset failed. {} could not be updated.", dbUser.getUsername());
logger.error("Password reset failed. {} could not be updated.", dbUser.getUsername());
}
return true;
......@@ -536,10 +536,10 @@ public class UserService implements IUserService {
helper.setSubject(subject);
helper.setText(body);
LOGGER.info("Sending mail \"{}\" from \"{}\" to \"{}\"", subject, msg.getFrom(), dbUser.getUsername());
logger.info("Sending mail \"{}\" from \"{}\" to \"{}\"", subject, msg.getFrom(), dbUser.getUsername());
mailSender.send(msg);
} catch (MailException | MessagingException e) {
LOGGER.warn("Mail \"{}\" could not be sent: {}", subject, e);
logger.warn("Mail \"{}\" could not be sent: {}", subject, e);
}
}
}
......@@ -78,7 +78,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
@Autowired
private IQuestionService questionService;
private static final Logger LOGGER = LoggerFactory.getLogger(ARSnovaSocketIOServer.class);
private static final Logger logger = LoggerFactory.getLogger(ARSnovaSocketIOServer.class);
private int portNumber;
private String hostIp;
......@@ -94,7 +94,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
@PreDestroy
public void closeAllSessions() {
LOGGER.info("Close all websockets due to @PreDestroy");
logger.info("Close all websockets due to @PreDestroy");
for (final SocketIOClient c : server.getAllClients()) {
c.disconnect();
}
......@@ -104,7 +104,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
c.send(new Packet(PacketType.DISCONNECT));
clientCount++;
}
LOGGER.info("Pending websockets at @PreDestroy: {}", clientCount);
logger.info("Pending websockets at @PreDestroy: {}", clientCount);
server.stop();
}
......@@ -123,7 +123,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
config.setKeyStore(stream);
config.setKeyStorePassword(storepass);
} catch (final FileNotFoundException e) {
LOGGER.error("Keystore {} not found on filesystem", keystore);
logger.error("Keystore {} not found on filesystem", keystore);
}
}
server = new SocketIOServer(config);
......@@ -134,7 +134,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
public void onData(final SocketIOClient client, final Feedback data, final AckRequest ackSender) {
final User u = userService.getUser2SocketId(client.getSessionId());
if (u == null) {
LOGGER.info("Client {} tried to send feedback but is not mapped to a user", client.getSessionId());
logger.info("Client {} tried to send feedback but is not mapped to a user", client.getSessionId());
return;
}
......@@ -142,9 +142,9 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
final de.thm.arsnova.entities.Session session = sessionService.getSessionInternal(sessionKey, u);
if (session.getFeedbackLock()) {
LOGGER.debug("Feedback save blocked: {}", u, sessionKey, data.getValue());
logger.debug("Feedback save blocked: {}", u, sessionKey, data.getValue());
} else {
LOGGER.debug("Feedback recieved: {}", u, sessionKey, data.getValue());
logger.debug("Feedback recieved: {}", u, sessionKey, data.getValue());
if (null != sessionKey) {
feedbackService.saveFeedback(sessionKey, data.getValue(), u);
}
......@@ -158,7 +158,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
public void onData(final SocketIOClient client, final Session session, final AckRequest ackSender) {
final User u = userService.getUser2SocketId(client.getSessionId());
if (null == u) {
LOGGER.info("Client {} requested to join session but is not mapped to a user", client.getSessionId());
logger.info("Client {} requested to join session but is not mapped to a user", client.getSessionId());
return;
}
......@@ -193,7 +193,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
try {
questionService.readInterposedQuestionInternal(question.getId(), user);
} catch (NotFoundException | UnauthorizedException e) {
LOGGER.error("Loading of question {} failed for user {} with exception {}", question.getId(), user, e.getMessage());
logger.error("Loading of question {} failed for user {} with exception {}", question.getId(), user, e.getMessage());
}
}
});
......@@ -205,7 +205,7 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
try {
questionService.readFreetextAnswer(answerId, user);
} catch (NotFoundException | UnauthorizedException e) {
LOGGER.error("Marking answer {} as read failed for user {} with exception {}", answerId, user, e.getMessage());
logger.error("Marking answer {} as read failed for user {} with exception {}", answerId, user, e.getMessage());
}
}
});
......@@ -259,14 +259,14 @@ public class ARSnovaSocketIOServer implements ARSnovaSocket, NovaEventVisitor {
}
public void stopServer() {
LOGGER.trace("In stopServer method of class: {}", getClass().getName());
logger.trace("In stopServer method of class: {}", getClass().getName());
try {
for (final SocketIOClient client : server.getAllClients()) {
client.disconnect();
}