List of usage examples for java.util.logging Level FINEST
Level FINEST
To view the source code for java.util.logging Level FINEST.
Click Source Link
From source file:com.microsoft.azure.util.TokenCache.java
private TokenCache(final AzureCredentials.ServicePrincipal servicePrincipal) { LOGGER.log(Level.FINEST, "TokenCache: TokenCache: Instantiate new cache manager"); this.credentials = servicePrincipal; // Compute the cloud name String cloudName = "<unknown"; if (credentials != null) cloudName = AzureUtil.getCloudName(credentials.subscriptionId.getPlainText()); final String home = Jenkins.getInstance().root.getPath(); LOGGER.log(Level.FINEST, "TokenCache: TokenCache: Cache home \"{0}\"", home); // Present the cloud name to the token file (rather than just simply the // subscription id because the same subscription id could be used between // classic and v2 plugins. Path homePath = Paths.get(home, String.format("%s-%s", cloudName, "azuretoken.txt")); this.path = homePath.toString(); LOGGER.log(Level.FINEST, "TokenCache: TokenCache: Cache file path \"{0}\"", path); }
From source file:name.richardson.james.bukkit.utilities.persistence.database.AbstractDatabaseLoader.java
synchronized public final void initalise() { this.load();//w w w . ja va2s.c o m if (!this.validate() || this.rebuild) { final SpiEbeanServer server = (SpiEbeanServer) this.ebeanserver; generator = server.getDdlGenerator(); if (!this.logger.isLoggable(Level.FINEST)) setGeneratorDebug(generator, false); this.drop(); this.create(); logger.log(Level.INFO, localisation.getMessage("rebuilt-schema")); } }
From source file:com.bdb.weather.display.windrose.WindRosePlot.java
/** * Load the wind rose data into the dataset. * /*from ww w .j a v a 2s .co m*/ * @param d The wind rose data */ public void setDataset(WindRoseData d) { data = d; if (d == null) { setDataset((XYSeriesCollection) null); return; } int numSlices = d.getNumSlices(); double arcLength = (360.0 / numSlices) / 2.0; double halfArcLength = arcLength / 2.0; XYSeriesCollection dataset = new XYSeriesCollection(); logger.log(Level.FINEST, "Creating Wind Rose dataset with {0} slices. arcLength = {1}", new Object[] { numSlices, arcLength }); // // First go through the wind direction slices. Each weather station can have a different number of // direction slices. The minimum is probably 4 and the maximum is probably 360. // int seriesNumber = 0; for (int i = 0; i < numSlices; i++) { WindSlice slice = d.getSlice(i); // // The length of the pie slice is determined by the percentage of the wind that was blowing within // the slice. Calm winds entries are ignored. // double percent = slice.getPercentageOfWind(); double lastLength = 0.0; logger.log(Level.FINER, "Slice {0} has {1} speed bins", new Object[] { i, slice.getNumSpeedBins() }); // // Each slice is then divided by speed bins. Each bin is represented by a color and the length // of each slice segment is determined by the percentage of time the wind was blowing within the // speed bin. // for (int j = 0; j < slice.getNumSpeedBins(); j++) { Heading heading = Heading.headingForSlice(i, numSlices); XYSeries series = new XYSeries(heading.toString() + j, false); double headingValue = heading.get(); double binPercentage = slice.speedBinPercentage(j); double length = lastLength; if (binPercentage != 0.0) length += percent * (binPercentage / 100.0); double left = headingValue - halfArcLength; double right = headingValue + halfArcLength; logger.log(Level.FINEST, "Adding series with data: {0},{1},{2}:{3}", new Object[] { left, right, length, slice.speedBinPercentage(j) }); // // Each slices speed segment is drawn as a separate series with its own color // series.add(left, lastLength); series.add(right, lastLength); series.add(right, length); series.add(left, length); dataset.addSeries(series); renderer.setSeriesPaint(seriesNumber, binColor[j]); renderer.setSeriesFilled(seriesNumber++, true); lastLength = length; } } setDataset(dataset); }
From source file:org.apache.bval.jsr.resolver.DefaultTraversableResolver.java
/** Tries to load detect and load JPA. */ @SuppressWarnings("unchecked") private void initJpa() { final ClassLoader classLoader = Reflection.getClassLoader(DefaultTraversableResolver.class); try {//ww w . ja va 2 s . c om Reflection.getClass(classLoader, PERSISTENCE_UTIL_CLASSNAME); if (LOG_FINEST) { log.log(Level.FINEST, String.format("Found %s on classpath.", PERSISTENCE_UTIL_CLASSNAME)); } } catch (final Exception e) { log.log(Level.FINEST, String.format("Cannot find %s on classpath. All properties will per default be traversable.", PERSISTENCE_UTIL_CLASSNAME)); return; } try { Class<? extends TraversableResolver> jpaAwareResolverClass = (Class<? extends TraversableResolver>) ClassUtils .getClass(classLoader, JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME, true); jpaTR = jpaAwareResolverClass.newInstance(); if (LOG_FINEST) { log.log(Level.FINEST, String.format("Instantiated an instance of %s.", JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME)); } } catch (final Exception e) { log.log(Level.WARNING, String.format( "Unable to load or instantiate JPA aware resolver %s. All properties will per default be traversable.", JPA_AWARE_TRAVERSABLE_RESOLVER_CLASSNAME), e); } }
From source file:org.jboss.aerogear.unifiedpush.rest.util.RequestTransformer.java
private JsonNode transformJson(JsonNode patch, StringBuilder json) throws IOException, JsonPatchException { JsonNode jsonNode = convertToJsonNode(json); for (JsonNode operation : patch) { try {/* w w w .j ava 2 s .c o m*/ final ArrayNode nodes = JsonNodeFactory.instance.arrayNode(); nodes.add(operation); JsonPatch patchOperation = JsonPatch.fromJson(nodes); jsonNode = patchOperation.apply(jsonNode); } catch (JsonPatchException e) { logger.log(Level.FINEST, "ignore field not found"); } } return jsonNode; }
From source file:jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy.java
@Override public GrantedAuthority[] getGrantedAuthorities(LdapUserDetails ldapUser) { List<GrantedAuthority> result = new ArrayList<GrantedAuthority>(); Attributes attributes = ldapUser.getAttributes(); final String attributeName = getAttributeName(); Attribute attribute = attributes == null ? null : attributes.get(attributeName); if (attribute != null) { try {/* w w w . ja va 2 s .c om*/ for (Object value : Collections.list(attribute.getAll())) { String groupName = String.valueOf(value); try { LdapName dn = new LdapName(groupName); groupName = String.valueOf(dn.getRdn(dn.size() - 1).getValue()); } catch (InvalidNameException e) { LOGGER.log(Level.FINEST, "Expected a Group DN but found: {0}", groupName); } result.add(new GrantedAuthorityImpl(groupName)); } } catch (NamingException e) { LogRecord lr = new LogRecord(Level.FINE, "Failed to retrieve member of attribute ({0}) from LDAP user details"); lr.setThrown(e); lr.setParameters(new Object[] { attributeName }); LOGGER.log(lr); } } return result.toArray(new GrantedAuthority[result.size()]); }
From source file:de.hofuniversity.iisys.neo4j.websock.query.encoding.logging.LoggingTSafeJsonQueryHandler.java
@Override public String encode(final WebsockQuery query) throws EncodeException { String result = null;/*ww w .j av a 2 s . c o m*/ try { long time = System.nanoTime(); final JSONObject obj = JsonConverter.toJson(query); result = obj.toString(); time = System.nanoTime() - time; if (fDebug) { fTotalBytesOut += result.getBytes().length; fLogger.log(Level.FINEST, "encoded JSON message: " + result.getBytes().length + " bytes\n" + "total bytes sent: " + fTotalBytesOut); } //store query type final String type = query.getPayload().toString(); synchronized (QUERY_TYPES) { QUERY_TYPES.put(query.getId(), type); } if (LOGGING_ENABLED) { //store size of query List<Integer> sizes = null; synchronized (LOGGED_OUT_SIZES) { sizes = LOGGED_OUT_SIZES.get(type); if (sizes == null) { sizes = new LinkedList<Integer>(); LOGGED_OUT_SIZES.put(type, sizes); } } synchronized (sizes) { sizes.add(result.getBytes().length); } //store time taken List<Long> times = null; synchronized (LOGGED_OUT_TIMES) { times = LOGGED_OUT_TIMES.get(type); if (times == null) { times = new LinkedList<Long>(); LOGGED_OUT_TIMES.put(type, times); } } synchronized (times) { times.add(time); } } } catch (JSONException e) { e.printStackTrace(); throw new EncodeException(query, "failed to encode JSON", e); } return result; }
From source file:org.archive.modules.deciderules.DecideRuleSequence.java
public DecideResult innerDecide(CrawlURI uri) { DecideRule decisiveRule = null;/* w w w.j a va2 s . com*/ int decisiveRuleNumber = -1; DecideResult result = DecideResult.NONE; List<DecideRule> rules = getRules(); int max = rules.size(); for (int i = 0; i < max; i++) { DecideRule rule = rules.get(i); if (rule.onlyDecision(uri) != result) { DecideResult r = rule.decisionFor(uri); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("DecideRule #" + i + " " + rule.getClass().getName() + " returned " + r + " for url: " + uri); } if (r != DecideResult.NONE) { result = r; decisiveRule = rule; decisiveRuleNumber = i; } } } if (fileLogger != null) { fileLogger.info( decisiveRuleNumber + " " + decisiveRule.getClass().getSimpleName() + " " + result + " " + uri); } return result; }
From source file:com.gisgraphy.domain.geoloc.service.fulltextsearch.SolrClientTest.java
@Test public void testSetSolRLogLevel() throws Exception { IsolrClient client = new SolrClient(AbstractIntegrationHttpSolrTestCase.fulltextSearchUrlBinded, new MultiThreadedHttpConnectionManager()); assertTrue(client.isServerAlive());//from w w w . j a va2s. c o m client.setSolRLogLevel(Level.CONFIG); client.setSolRLogLevel(Level.FINE); client.setSolRLogLevel(Level.FINER); client.setSolRLogLevel(Level.FINEST); client.setSolRLogLevel(Level.INFO); client.setSolRLogLevel(Level.SEVERE); client.setSolRLogLevel(Level.WARNING); client.setSolRLogLevel(Level.ALL); client.setSolRLogLevel(Level.OFF); }
From source file:edu.usu.sdl.apiclient.AbstractService.java
protected void logon() { //get the initial cookies HttpGet httpget = new HttpGet(loginModel.getServerUrl()); try (CloseableHttpResponse response = httpclient.execute(httpget)) { HttpEntity entity = response.getEntity(); log.log(Level.FINE, "Login form get: {0}", response.getStatusLine()); EntityUtils.consume(entity);/*from ww w . j av a2 s . c o m*/ log.log(Level.FINEST, "Initial set of cookies:"); List<Cookie> cookies = cookieStore.getCookies(); if (cookies.isEmpty()) { log.log(Level.FINEST, "None"); } else { for (Cookie cookie : cookies) { log.log(Level.FINEST, "- {0}", cookie.toString()); } } } catch (IOException ex) { throw new ConnectionException("Unable to Connect.", ex); } //login try { HttpUriRequest login = RequestBuilder.post().setUri(new URI(loginModel.getSecurityUrl())) .addParameter(loginModel.getUsernameField(), loginModel.getUsername()) .addParameter(loginModel.getPasswordField(), loginModel.getPassword()).build(); try (CloseableHttpResponse response = httpclient.execute(login)) { HttpEntity entity = response.getEntity(); log.log(Level.FINE, "Login form get: {0}", response.getStatusLine()); EntityUtils.consume(entity); log.log(Level.FINEST, "Post logon cookies:"); List<Cookie> cookies = cookieStore.getCookies(); if (cookies.isEmpty()) { log.log(Level.FINEST, "None"); } else { for (Cookie cookie : cookies) { log.log(Level.FINEST, "- {0}", cookie.toString()); } } } //For some reason production requires getting the first page first RequestConfig defaultRequestConfig = RequestConfig.custom().setCircularRedirectsAllowed(true).build(); HttpUriRequest data = RequestBuilder.get().setUri(new URI(loginModel.getServerUrl())) .addHeader(CONTENT_TYPE, MEDIA_TYPE_JSON).setConfig(defaultRequestConfig).build(); try (CloseableHttpResponse response = httpclient.execute(data)) { log.log(Level.FINE, "Response Status from connection: {0} {1}", new Object[] { response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase() }); HttpEntity entity1 = response.getEntity(); EntityUtils.consume(entity1); } } catch (IOException | URISyntaxException ex) { throw new ConnectionException("Unable to login.", ex); } }