Example usage for java.util.logging Level FINE

List of usage examples for java.util.logging Level FINE

Introduction

In this page you can find the example usage for java.util.logging Level FINE.

Prototype

Level FINE

To view the source code for java.util.logging Level FINE.

Click Source Link

Document

FINE is a message level providing tracing information.

Usage

From source file:de.jackwhite20.japs.server.network.Connection.java

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {

    LOGGER.log(Level.FINE, "[{0}] New connection", remoteAddress.toString());
}

From source file:net.chrissearle.flickrvote.web.stats.ShowChallengeChartAction.java

public String stats() throws Exception {
    initializeChallengeInfo();//  ww  w  .  ja  va  2 s .  c o m

    ChallengeItem challenge = photographyService.getChallengeImages(tag);

    images = new ArrayList<Image>(challenge.getImages().size());

    for (ImageItem image : challenge.getImages()) {
        final DisplayImage displayImage = new DisplayImage(image);

        images.add(displayImage);

        if (logger.isLoggable(Level.FINE)) {
            logger.info("Saw " + displayImage.toString());
        }
    }

    Collections.sort(images, new Comparator<Image>() {
        public int compare(Image o1, Image o2) {
            return o1.getRank().compareTo(o2.getRank());
        }
    });

    if (small) {
        height = (long) (18 * images.size()) + 20;
    } else {
        height = (long) (30 * images.size()) + 140;
    }

    return SUCCESS;
}

From source file:com.stratuscom.harvester.Utils.java

public static void logClassLoaderHierarchy(Logger log, Class cls) {
    logClassLoaderHierarchy(log, Level.FINE, cls);
}

From source file:com.bardsoftware.server.auth.AuthService.java

public Principal getUserFromLoginService(String jsonText, OAuthPlugin loginService) {
    try {//  ww  w.j a  v  a2 s.  com
        if (jsonText == null) {
            return null;
        }
        LOGGER.log(Level.FINE, "json from login service=" + jsonText);
        JSONObject json = new JSONObject(jsonText);
        if (loginService.isResponseOk(json)) {
            String userId = loginService.createUserId(json);
            Principal result = principalExtent.find(userId);
            if (result == null) {
                String name = loginService.createUserName(json);
                result = principalExtent.create(userId, name);
            }
            result.save();
            return result;
        }
    } catch (JSONException e) {
        LOGGER.log(Level.SEVERE, "", e);
    }
    return null;
}

From source file:com.ibm.liberty.starter.StarterUtil.java

public static String createCleanWorkspace() throws IOException {
    String uuid = UUID.randomUUID().toString();

    //Clean up workspace directory if it already exists (from previous server run)
    String workspaceDirPath = StarterUtil.getWorkspaceDir(uuid);
    File workspaceDir = new File(workspaceDirPath);
    if (workspaceDir.exists()) {
        log.log(Level.FINE, "Workspace directory already exists : " + workspaceDirPath);
        FileUtils.deleteDirectory(workspaceDir);
        log.log(Level.FINE, "Deleted workspace directory : " + workspaceDirPath);
    }/*from   w  ww.  j  a  v a2  s .  c om*/
    return uuid;
}

From source file:org.freaknet.gtrends.api.GoogleTrendsClient.java

/**
 * Execute the request.//from www .ja va 2s  .  c  o m
 *
 * @param request
 * @return content The content of the response
 * @throws GoogleTrendsClientException
 */
public String execute(GoogleTrendsRequest request) throws GoogleTrendsClientException {
    String html = null;
    try {
        if (!authenticator.isLoggedIn()) {
            authenticator.authenticate();
        }
        Logger.getLogger(GoogleConfigurator.getLoggerPrefix()).log(Level.FINE, "Query: {0}",
                request.build().toString());

        HttpRequestBase httpRequest = request.build();
        HttpResponse response = client.execute(httpRequest);
        html = GoogleUtils.toString(response.getEntity().getContent());
        httpRequest.releaseConnection();

        Pattern p = Pattern.compile(
                GoogleConfigurator.getConfiguration().getString("google.trends.client.reError"),
                Pattern.CASE_INSENSITIVE);
        Matcher matcher = p.matcher(html);
        if (matcher.find()) {
            throw new GoogleTrendsClientException(
                    "*** You are running too fast man! Looks like you reached your quota limit. Wait a while and slow it down with the '-S' option! *** ");
        }
    } catch (GoogleAuthenticatorException ex) {
        throw new GoogleTrendsClientException(ex);
    } catch (ClientProtocolException ex) {
        throw new GoogleTrendsClientException(ex);
    } catch (IOException ex) {
        throw new GoogleTrendsClientException(ex);
    } catch (ConfigurationException ex) {
        throw new GoogleTrendsClientException(ex);
    } catch (GoogleTrendsRequestException ex) {
        throw new GoogleTrendsClientException(ex);
    }

    return html;
}

From source file:onl.area51.filesystem.http.client.HttpUtils.java

public static void send(char[] path, Function<char[], String> remoteUri, Function<char[], Path> getPath,
        Supplier<String> userAgent) throws IOException {
    if (path == null || path.length == 0) {
        throw new FileNotFoundException("/");
    }//from w w w .j  ava 2s  . c  om

    String uri = remoteUri.apply(path);
    if (uri != null) {

        HttpEntity entity = new PathEntity(getPath.apply(path));

        LOG.log(Level.FINE, () -> "Sending " + uri);

        HttpPut put = new HttpPut(uri);
        put.setHeader(USER_AGENT, userAgent.get());
        put.setEntity(entity);

        try (CloseableHttpClient client = HttpClients.createDefault()) {
            try (CloseableHttpResponse response = client.execute(put)) {

                int returnCode = response.getStatusLine().getStatusCode();
                LOG.log(Level.FINE,
                        () -> "ReturnCode " + returnCode + ": " + response.getStatusLine().getReasonPhrase());
            }
        }
    }
}

From source file:name.richardson.james.bukkit.alias.PlayerListener.java

@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onPlayerLogin(final AsyncPlayerPreLoginEvent event) {
    logger.log(Level.FINE, "Received {0}", event.getClass().getSimpleName());
    PlayerNameRecord playerNameRecord = playerNameRecordManager.create(event.getName());
    InetAddressRecord inetAddressRecord = inetAddressRecordManager.create(event.getAddress().getHostAddress());
    final Timestamp now = new Timestamp(System.currentTimeMillis());
    if (!playerNameRecord.getAddresses().contains(inetAddressRecord)) {
        playerNameRecord.getAddresses().add(inetAddressRecord);
    }/*  www .j  a v  a  2s.  c o m*/
    playerNameRecord.setLastSeen(now);
    inetAddressRecord.setLastSeen(now);
    playerNameRecordManager.save(playerNameRecord);
    inetAddressRecordManager.save(inetAddressRecord);
}

From source file:com.boundlessgeo.geoserver.api.controllers.ConfigurationLockInterceptor.java

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
        throws Exception {
    if (THREAD_LOCK.get() != null) {
        throw new RuntimeException("existing lock found on " + request.getPathInfo());
    }/*  w w  w . ja  va 2  s . c o m*/
    String method = request.getMethod().toLowerCase();
    GeoServerConfigurationLock.LockType lockType;
    switch (method) {
    case "get":
    case "head":
    case "options":
        lockType = GeoServerConfigurationLock.LockType.READ;
        break;
    default:
        // defaulting to a write lock is probably the safest bet here
        // unless a new, popular read method is invented sometime...
        lockType = GeoServerConfigurationLock.LockType.WRITE;
    }
    if (logger.isLoggable(Level.FINE)) {
        logger.fine("DEBUG LOCK: " + lockType);
    }
    THREAD_LOCK.set(lockType);
    lock().lock(lockType);
    return true;
}

From source file:org.gameontext.regsvc.db.RegistrationDocuments.java

/**
 * Register a room for an event/*from  w w w. j  a  v a2s .c  om*/
 */
public boolean registerRoom(Registration reg) {
    Log.mapOperations(Level.FINE, this, "Add new registration: {0}", reg);

    try {
        System.out.println("Registering room : " + mapper.writeValueAsString(reg));
    } catch (JsonProcessingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    try {
        db.create(reg);
    } catch (UpdateConflictException ex) {
        // If there is a conflict, we'll return false so that the caller tries again.
        return false;
    }

    return true;
}