List of usage examples for java.util.logging Level FINE
Level FINE
To view the source code for java.util.logging Level FINE.
Click Source Link
From source file:com.l2jfree.mmocore.network.MMOLogger.java
@Override public void debug(Object message, Throwable throwable) { log(Level.FINE, String.valueOf(message), throwable); }
From source file:com.hello2morrow.sonargraph.jenkinsplugin.model.TimeSeriesPlot.java
/** * //www . j a va 2s. co m * @param maxDataPoints don't reduce the set if maxDataPoints <= 0 */ private List<IDataPoint> reduceDataSet(List<IDataPoint> dataset, int maxDataPoints) { assert dataset != null : "Parameter 'dataset' of method 'reduceDataSet' must not be null"; if (maxDataPoints <= 0) { return dataset; } int size = dataset.size(); if (size <= maxDataPoints) { if (size > m_markerPosition) { IDataPoint point = dataset.get(dataset.size() - m_markerPosition); if (point instanceof BuildDataPoint) { m_markerTimestamp = ((BuildDataPoint) point).getTimestamp(); } } return dataset; } int compressionFactor = 2; if ((size % maxDataPoints) == 0) { compressionFactor = size / maxDataPoints; } else { compressionFactor = (size / maxDataPoints) + 1; } List<IDataPoint> compressedSet = new ArrayList<IDataPoint>(); SonargraphLogger.INSTANCE.log(Level.FINE, "Compressing data set of size '" + size + "' by a factor of '" + compressionFactor + "'"); for (int i = 0; i < size; i = i + compressionFactor) { double valueSum = 0.0; long timestamp = 0L; int buildNumber = 0; int actualFactor = 0; for (int j = 0; j < compressionFactor; j++) { if ((i + j) >= size) { break; } actualFactor = j + 1; IDataPoint point = dataset.get(i + j); if (point instanceof BuildDataPoint) { valueSum += point.getY(); buildNumber = point.getX(); timestamp = ((BuildDataPoint) point).getTimestamp(); if ((i + j) == (size - m_markerPosition)) { m_markerTimestamp = timestamp; } } else { SonargraphLogger.INSTANCE.log(Level.FINE, "DataPoint [" + (i + j) + "] is of type '" + point.getClass().getName() + "', expect type '" + BuildDataPoint.class.getName() + "'"); } } compressedSet.add(new BuildDataPoint(buildNumber, valueSum / actualFactor, timestamp)); } return compressedSet; }
From source file:edu.umass.cs.protocoltask.ProtocolExecutor.java
/** * @param actualTask//from w w w.jav a 2s. co m * @return True if spawned. */ public synchronized boolean spawnIfNotRunning(ProtocolTask<NodeIDType, EventType, KeyType> actualTask) { if (this.isRunning(actualTask.getKey())) { log.log(Level.FINE, "{0} unable to re-spawn already running task", new Object[] { this, actualTask.getKey() }); return false; } this.spawn(actualTask); return true; }
From source file:org.cloudifysource.esc.shell.installer.CloudGridAgentBootstrapper.java
private static void logServerDetails(final MachineDetails server) { if (logger.isLoggable(Level.FINE)) { logger.fine(nodePrefix(server) + "Cloud Server was created."); logger.fine(nodePrefix(server) + "Public IP: " + (server.getPublicAddress() == null ? "" : server.getPublicAddress())); logger.fine(nodePrefix(server) + "Private IP: " + (server.getPrivateAddress() == null ? "" : server.getPrivateAddress())); }/*from w w w . jav a2 s. c o m*/ }
From source file:org.cogsurv.cogsurver.http.AbstractHttpApi.java
/** * execute() an httpRequest catching exceptions and returning null instead. * * @param httpRequest/*from w w w . j a va2 s.co m*/ * @return * @throws IOException */ public HttpResponse executeHttpRequest(HttpRequestBase httpRequest) throws IOException { if (DEBUG) LOG.log(Level.FINE, "executing HttpRequest for: " + httpRequest.getURI().toString()); try { mHttpClient.getConnectionManager().closeExpiredConnections(); return mHttpClient.execute(httpRequest); } catch (IOException e) { httpRequest.abort(); throw e; } }
From source file:com.pivotal.gemfire.tools.pulse.internal.log.PulseLogWriter.java
@Override public void fine(String msg, Throwable ex) { logger.logp(Level.FINE, "", "", msg, ex); }
From source file:com.ibm.ws.lars.rest.RepositoryRESTResourceLoggingTest.java
@Test public void testCreateAttachmentNoContent(@Mocked final Logger logger) throws InvalidJsonAssetException, InvalidIdException, AssetPersistenceException, NonExistentArtefactException { new Expectations() { {//from ww w . jav a2s. c o m logger.isLoggable(Level.FINE); result = true; logger.fine("createAttachmentNoContent called, name: " + "name" + " assetId: " + NON_EXISTENT_ID + " json content:\n" + "{}"); } }; getRestResource().createAttachmentNoContent("name", NON_EXISTENT_ID, null, "{}", dummyUriInfo); }
From source file:org.tomitribe.tribestream.registryng.repository.Repository.java
public OpenApiDocument findByApplicationId(final String applicationId) throws NoResultException { try {/*from w w w . ja v a 2 s.c om*/ return em.createNamedQuery(OpenApiDocument.Queries.FIND_BY_APPLICATIONID, OpenApiDocument.class) .setParameter("applicationId", applicationId).getSingleResult(); } catch (NoResultException e) { LOGGER.log(Level.FINE, "Could not find application by id {0}", applicationId); return null; } }
From source file:ffx.potential.bonded.SturmMethod.java
/** * Solve using the Sturm method./* w w w .ja va 2 s.co m*/ * * @param p_order * @param n_root * @param poly_coeffs * @param roots */ public void solveSturm(int[] p_order, int[] n_root, double[] poly_coeffs, double[] roots) { Polynomial[] sseq = new Polynomial[Polynomial.MAX_ORDER * 2]; double min, max; int order, nroots, nchanges, np; int[] atmin = new int[1]; int[] atmax = new int[1]; this.roots = roots; for (int i = 0; i < Polynomial.MAX_ORDER * 2; i++) { sseq[i] = new Polynomial(); } order = p_order[0]; for (int i = order; i >= 0; i--) { sseq[0].coefficients[i] = poly_coeffs[i]; } if (logger.isLoggable(Level.FINE)) { StringBuilder string = new StringBuilder(); for (int i = order; i >= 0; i--) { string.append(String.format(" Coefficients in Sturm solver\n")); string.append(String.format("%d %f\n", i, sseq[0].coefficients[i])); } logger.fine(string.toString()); } np = buildSturm(order, sseq); if (logger.isLoggable(Level.FINE)) { StringBuilder string1 = new StringBuilder(); string1.append(String.format(" Sturm sequence for:\n")); for (int i = order; i >= 0; i--) { string1.append(String.format("%f ", sseq[0].coefficients[i])); string1.append("\n"); } for (int i = 0; i <= np; i++) { for (int j = sseq[i].order; j >= 0; j--) { string1.append(String.format("%f ", sseq[i].coefficients[j])); string1.append("\n"); } } logger.fine(string1.toString()); } //get the number of real roots nroots = numRoots(np, sseq, atmin, atmax); if (nroots == 0) { n_root[0] = nroots; } if (logger.isLoggable(Level.FINE)) { logger.fine(String.format(" Number of real roots: %d\n", nroots)); } //calculate the bracket that the roots live in min = -1.0; nchanges = numChanges(np, sseq, min); for (int i = 0; nchanges != atmin[0] && i != MAXPOW; i++) { min *= 10.0; nchanges = numChanges(np, sseq, min); } if (nchanges != atmin[0]) { logger.fine(String.format(" Solve: unable to bracket all negative roots\n")); atmin[0] = nchanges; } max = 1.0; nchanges = numChanges(np, sseq, max); for (int i = 0; nchanges != atmax[0] && i != MAXPOW; i++) { max *= 10.0; nchanges = numChanges(np, sseq, max); } if (nchanges != atmax[0]) { logger.fine(String.format(" Solve: unable to bracket all positive roots\n")); atmax[0] = nchanges; } // Perform the bisection nroots = atmin[0] - atmax[0]; sturmBisection(np, sseq, min, max, atmin[0], atmax[0], this.roots); n_root[0] = nroots; //write out the roots if (logger.isLoggable(Level.FINE)) { if (nroots == 1) { logger.fine(String.format("\n One distinct real root at x = %f\n", this.roots[0])); } else { StringBuilder string2 = new StringBuilder(); string2.append(String.format("\n %d distinct real roots for x: \n", nroots)); for (int i = 0; i != nroots; i++) { string2.append(String.format("%f\n", this.roots[i])); } logger.fine(string2.toString()); } } }
From source file:edu.emory.cci.aiw.umls.UMLSDatabaseConnection.java
@Override public List<ConceptUID> getCUI(CUIQuerySearchUID uid, List<SAB> sabs, boolean caseSensitive) throws UMLSQueryException { try {//w w w .j av a2 s. c o m setupConn(); StringBuilder sql = new StringBuilder("select distinct(CUI) from MRCONSO where "); sql.append(uid.getKeyName()); sql.append(" = "); if (caseSensitive) { sql.append("BINARY "); } sql.append("?"); if (sabs != null && !sabs.isEmpty()) { sql.append(" and "); sql.append(singletonOrSetClause(sabs.get(0).getKeyName(), sabs.size())); } log(Level.FINE, sql.toString()); List<UMLSQuerySearchUID> params = new ArrayList<UMLSQuerySearchUID>(); params.add(uid); if (sabs != null) { params.addAll(sabs); } ResultSet r = executeAndLogQuery(substParams(sql.toString(), params)); List<ConceptUID> cuis = new ArrayList<ConceptUID>(); while (r.next()) { cuis.add(ConceptUID.fromString(r.getString(1))); } return cuis; } catch (SQLException sqle) { throw new UMLSQueryException(sqle); } catch (MalformedUMLSUniqueIdentifierException muuie) { throw new UMLSQueryException(muuie); } finally { tearDownConn(); } }