Code example for Logger

Methods: info, warning

0
	 
	@Override 
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
 
		logger.info("Check current session");
		HttpSession session = request.getSession(false);
		 
        if (session == null) {
			logger.warning("Session can't be found");
			response.sendRedirect("/login");
			return false; 
		} 
 
		logger.info("Check signin user");
		Member member = (Member) session.getAttribute("member");
 
		if ( member == null) {
			logger.warning("Please sign in");
			response.sendRedirect("/login");
			return false; 
		} 
		return true; 
	}