List of usage examples for java.util.logging Level FINER
Level FINER
To view the source code for java.util.logging Level FINER.
Click Source Link
From source file:org.geoserver.importer.format.GeoJSONFormat.java
SimpleFeature sniff(File file) { try {/*from w ww. ja v a 2 s .c om*/ FeatureIterator it = new FeatureJSON().streamFeatureCollection(file); try { if (it.hasNext()) { return (SimpleFeature) it.next(); } } finally { it.close(); } } catch (Exception e) { LOG.log(Level.FINER, "Error reading fiel as json", e); } return null; }
From source file:com.archivas.clienttools.arcutils.utils.net.GetCertsX509TrustManager.java
public GetCertsX509TrustManager(HCAPProfile profile, final SSLCertificateCallback sslExceptionCallback) throws NoSuchAlgorithmException, NoSuchProviderException, KeyStoreException { super();/*from ww w . j a v a2 s. c o m*/ this.profile = profile; this.hostname = profile.getHostname(); // getHostname returns the hostname provided in the // profile wizard synchronized (LOCK) { this.sslExceptionCallback = sslExceptionCallback; LOG.log(Level.FINER, "Entering GetCertsX509TrustManager(Keystore, callback)"); initStandardTrustManager(null); initPersistedTrustManager(); initMemoryTrustManager(); if (standardTrustManager == null && persistedTrustManager == null && memoryTrustManager == null) { throw new NoSuchAlgorithmException("no trust manager found"); } } }
From source file:com.ibm.jaggr.service.impl.config.BundleVersionsHash.java
@Override public void modifyScope(IAggregator aggregator, Object scope) { final String sourceMethod = "prepareEnv"; //$NON-NLS-1$ boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(BundleVersionsHash.class.getName(), sourceMethod, new Object[] { aggregator, scope }); }//from w ww.j a v a2 s .com FunctionObject fn = new FunctionObject((Scriptable) scope, this); ScriptableObject.putProperty((Scriptable) scope, propName, fn); if (isTraceLogging) { log.exiting(BundleVersionsHash.class.getName(), sourceMethod); } }
From source file:com.granule.json.utils.internal.JSONSAXHandler.java
/** * This function parses an IFix top level element and all its children. *//*w w w .j a va 2 s . c o m*/ public void startElement(String namespaceURI, String localName, String qName, Attributes attrs) throws SAXException { if (logger.isLoggable(Level.FINER)) logger.exiting(className, "startElement(String,String,String,org.xml.sax.Attributes)"); Properties props = new Properties(); int attrLength = attrs.getLength(); for (int i = 0; i < attrLength; i++) { props.put(attrs.getQName(i), attrs.getValue(i)); } JSONObject obj = new JSONObject(localName, props); if (this.head == null) { this.head = obj; this.current = head; } else { if (current != null) { this.previousObjects.push(current); this.current.addJSONObject(obj); } this.current = obj; } if (logger.isLoggable(Level.FINER)) logger.exiting(className, "startElement(String,String,String,org.xml.sax.Attributes)"); }
From source file:org.gameontext.mediator.PlayerClient.java
/** * The {@code @PostConstruct} annotation indicates that this method should * be called immediately after the {@code PlayerClient} is instantiated * with the default no-argument constructor. * * @see PostConstruct/* w w w. j a v a2 s.c o m*/ * @see ApplicationScoped */ @PostConstruct public void initClient() { if (playerLocation == null) { Log.log(Level.SEVERE, this, "Player client can not be initialized, 'playerUrl' is not defined"); throw new IllegalStateException("Unable to initialize PlayerClient"); } Client client = ClientBuilder.newBuilder() .property("com.ibm.ws.jaxrs.client.ssl.config", "DefaultSSLSettings") .property("com.ibm.ws.jaxrs.client.disableCNCheck", true).build(); client.register(JsonProvider.class); this.root = client.target(playerLocation); Log.log(Level.FINER, this, "Player client initialized with {0}", playerLocation); }
From source file:org.geoserver.wps.gs.raster.algebra.JiffleScriptProcessTest.java
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoTiffFormat format = new GeoTiffFormat(); hints = new RenderingHints(JAI.KEY_TILE_CACHE, new SunTileCache(1024 * 1024 * 1024)); // Image preparation if (testCoverage1 == null) { GeoTiffReader reader = null;//w w w . j a va 2s .c o m try { final File input = new File(getClass().getResource(IMAGE_NAME_1).getPath()); reader = format.getReader(input); testCoverage1 = reader.read(null); } catch (Exception e) { LOGGER.log(Level.FINER, e.getMessage(), e); } finally { if (reader != null) { reader.dispose(); } } } if (testCoverage2 == null) { GeoTiffReader reader = null; try { final File input = new File(getClass().getResource(IMAGE_NAME_2).getPath()); reader = format.getReader(input); testCoverage2 = reader.read(null); } catch (Exception e) { LOGGER.log(Level.FINER, e.getMessage(), e); } finally { if (reader != null) { reader.dispose(); } } } if (testCoverage3 == null) { GeoTiffReader reader = null; try { final File input = new File(getClass().getResource(IMAGE_NAME_3).getPath()); reader = format.getReader(input); testCoverage3 = reader.read(null); } catch (Exception e) { LOGGER.log(Level.FINER, e.getMessage(), e); } finally { if (reader != null) { reader.dispose(); } } } }
From source file:org.b3log.solo.event.ping.AddArticleGoogleBlogSearchPinger.java
@Override public void action(final Event<JSONObject> event) throws EventException { final JSONObject eventData = event.getData(); String articleTitle = null;// w w w . ja v a2s . c o m try { final JSONObject article = eventData.getJSONObject(Article.ARTICLE); articleTitle = article.getString(Article.ARTICLE_TITLE); final JSONObject preference = PreferenceQueryService.getInstance().getPreference(); final String blogTitle = preference.getString(Preference.BLOG_TITLE); String blogHost = preference.getString(Preference.BLOG_HOST).toLowerCase().trim(); if ("localhost".equals(blogHost.split(":")[0].trim())) { LOGGER.log(Level.INFO, "Blog Solo runs on local server, so should not ping " + "Google Blog Search Service for the article[title={0}]", new Object[] { article.getString(Article.ARTICLE_TITLE) }); return; } blogHost = StringUtils.removeEnd("http://" + blogHost, "/"); final String articlePermalink = blogHost + article.getString(Article.ARTICLE_PERMALINK); final String spec = "http://blogsearch.google.com/ping?name=" + URLEncoder.encode(blogTitle, "UTF-8") + "&url=" + URLEncoder.encode(blogHost, "UTF-8") + "&changesURL=" + URLEncoder.encode(articlePermalink, "UTF-8"); LOGGER.log(Level.FINER, "Request Google Blog Search Service API[{0}] while adding an " + "article[title=" + articleTitle + "]", spec); final HTTPRequest request = new HTTPRequest(); request.setURL(new URL(spec)); URL_FETCH_SERVICE.fetchAsync(request); } catch (final Exception e) { LOGGER.log(Level.SEVERE, "Ping Google Blog Search Service fail while adding an article[title=" + articleTitle + "]", e); } }
From source file:modmanager.backend.ModificationOption.java
/** * Renames folders to be compatible to unix file systems *//* w w w. ja va2 s . c o m*/ private void makeUnixCompatible(File path) { logger.log(Level.FINER, "Making modification compatible to UNIX filesystems (Mac, Linux, ...)"); /** * Check if the data folder is named wrong */ if (FileUtils.getFile(path, "data").exists()) { FileUtils.getFile(path, "data").renameTo(FileUtils.getFile(path, "Data")); /** * Go to data directory */ path = FileUtils.getFile(path, "Data"); logger.log(Level.FINEST, "unix: Renamed data to Data"); } else if (FileUtils.getFile(directory, "Data").exists()) { /** * Go to data directory */ path = FileUtils.getFile(path, "Data"); } /** * All top folders should be renamed to uppercase letter first */ for (File dir : path.listFiles()) { if (dir.isDirectory()) { if (Character.isLowerCase(dir.getName().charAt(0))) { /** * Silently assuming that a folder has more than one letter */ String new_name = Character.toUpperCase(dir.getName().charAt(0)) + dir.getName().substring(1); dir.renameTo(FileUtils.getFile(dir.getParentFile(), new_name)); logger.log(Level.FINEST, "unix: Renamed {0} to {1}", new Object[] { dir.getAbsolutePath(), new_name }); } } } }
From source file:org.b3log.solo.event.ping.UpdateArticleGoogleBlogSearchPinger.java
@Override public void action(final Event<JSONObject> event) throws EventException { final JSONObject eventData = event.getData(); String articleTitle = null;//from ww w . ja va2 s . c om try { final JSONObject article = eventData.getJSONObject(Article.ARTICLE); articleTitle = article.getString(Article.ARTICLE_TITLE); final JSONObject preference = PreferenceQueryService.getInstance().getPreference(); final String blogTitle = preference.getString(Preference.BLOG_TITLE); String blogHost = preference.getString(Preference.BLOG_HOST).toLowerCase().trim(); if ("localhost".equals(blogHost.split(":")[0].trim())) { LOGGER.log(Level.INFO, "Blog Solo runs on local server, so should not ping " + "Google Blog Search Service for the article[title={0}]", new Object[] { article.getString(Article.ARTICLE_TITLE) }); return; } blogHost = StringUtils.removeEnd("http://" + blogHost, "/"); final String articlePermalink = blogHost + article.getString(Article.ARTICLE_PERMALINK); final String spec = "http://blogsearch.google.com/ping?name=" + URLEncoder.encode(blogTitle, "UTF-8") + "&url=" + URLEncoder.encode(blogHost, "UTF-8") + "&changesURL=" + URLEncoder.encode(articlePermalink, "UTF-8"); LOGGER.log(Level.FINER, "Request Google Blog Search Service API[{0}] while updateing " + "an article[title=" + articleTitle + "]", spec); final HTTPRequest request = new HTTPRequest(); request.setURL(new URL(spec)); URL_FETCH_SERVICE.fetchAsync(request); } catch (final Exception e) { LOGGER.log(Level.SEVERE, "Ping Google Blog Search Service fail while updating an " + "article[title=" + articleTitle + "]", e); } }
From source file:magma.agent.agentmodel.impl.GyroRate.java
public void setGyro(Vector3D gyro) { this.gyro = gyro; double x, y, z; x = Math.toRadians(gyro.getX() * 0.02); y = Math.toRadians(gyro.getY() * 0.02); z = Math.toRadians(gyro.getZ() * 0.02); double[] rotationValues = new double[9]; rotationValues[0] = cos(y) * cos(z) + sin(x) * sin(y) * sin(z); rotationValues[1] = sin(z) * cos(x); rotationValues[2] = -sin(y) * cos(z) + sin(x) * cos(y) * sin(z); rotationValues[3] = -cos(y) * sin(z) + sin(x) * sin(y) * cos(z); rotationValues[4] = cos(x) * cos(z); rotationValues[5] = sin(z) * sin(z) + sin(x) * cos(y) * cos(z); rotationValues[6] = cos(x) * sin(y); rotationValues[7] = -sin(x);/*from www. ja va 2s.co m*/ rotationValues[8] = cos(x) * cos(y); Matrix3d M = new Matrix3d(rotationValues); M.mul(identity); // Error correction // N = M / sqrt(MT x M) // N - closest rotation result without errors // M - with errors // MT - transpose of M // sqrt of matrix - done by Cholesky Algorithm in MatrixUtil.java Matrix3d MT = new Matrix3d(M.m00, M.m10, M.m20, M.m01, M.m11, M.m21, M.m02, M.m12, M.m22); MT.mul(M); // call cholesky for sqrt(matrix) Matrix3d sqrt = MatrixUtil.cholesky(MT); sqrt.invert(); M.mul(sqrt); // setting identity as result of error correction identity = M; logger.log(Level.FINER, "gyro update: ({0}, {1}, {2})", new Object[] { identity.m02, identity.m12, identity.m22 }); }