Code example for Logger

Methods: log

0
     * @param request the specified request 
     */ 
    public static void onlineVisitorCount(final HttpServletRequest request) {
        final String remoteAddr = Requests.getRemoteAddr(request);
         
        LOGGER.log(Level.FINER, "Current request [IP={0}]", remoteAddr);
         
        ONLINE_VISITORS.put(remoteAddr, System.currentTimeMillis());
        LOGGER.log(Level.FINER, "Current online visitor count [{0}]", ONLINE_VISITORS.size());
    } 
 
    /** 
     * Removes the expired online visitor. 
     */ 
    public static void removeExpiredOnlineVisitor() { 
        final long currentTimeMillis = System.currentTimeMillis();
 
        final Iterator<Entry<String, Long>> iterator = ONLINE_VISITORS.entrySet().iterator();
 
        while (iterator.hasNext()) {
            final Entry<String, Long> onlineVisitor = iterator.next();