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.esri.gpt.catalog.search.SearchFilterSpatial.java
/** * Instantiates a new search filter spatial. *//* ww w .ja va2 s . co m*/ public SearchFilterSpatial() { super(); reset(); // Load a fioel with predefined extents (bookmarks) Document domFe; XPath xpathFe; try { String sPredefinedExtents = PREDEFINED_EXTENTS_FILE; LogUtil.getLogger().log(Level.FINE, "Loading Predefined extents file: {0}", sPredefinedExtents); domFe = DomUtil.makeDomFromResourcePath(sPredefinedExtents, false); xpathFe = XPathFactory.newInstance().newXPath(); } catch (Exception e) { LogUtil.getLogger().log(Level.FINE, "No predefined extents file"); domFe = null; xpathFe = null; } // predefined extent file root Node rootFe = null; try { if (domFe != null) rootFe = (Node) xpathFe.evaluate("/extents", domFe, XPathConstants.NODE); } catch (Exception e) { rootFe = null; LogUtil.getLogger().log(Level.FINE, "Xpath problem for predefined extents file"); } /** * Reads Bookmarks and load an array */ NodeList extents; ArrayList extentsList = new ArrayList(); if (rootFe != null) { try { extents = (NodeList) xpathFe.evaluate("extent", rootFe, XPathConstants.NODESET); for (Node extent : new NodeListAdapter(extents)) { String extPlace = (String) xpathFe.evaluate("@place", extent, XPathConstants.STRING); String extValue = (String) xpathFe.evaluate("@ext", extent, XPathConstants.STRING); LogUtil.getLogger().log(Level.FINE, "Element added:" + extPlace + "," + extValue); SelectItem extElement = new SelectItem(extValue, extPlace); extentsList.add(extElement); } } catch (Exception e) { extentsList = null; LogUtil.getLogger().log(Level.FINE, "Xpath problem for predefined extents file"); } } else extentsList = null; this._predefinedExtents = extentsList; }
From source file:SerialVersionUID.java
/** * Build a TreeMap of the class name to ClassVersionInfo * /*from w w w .j a v a 2s .c om*/ * @param jar * @param classVersionMap * TreeMap<String, ClassVersionInfo> for serializable classes * @param cl - * the class loader to use * @throws IOException * thrown if the jar cannot be opened */ static void generateJarSerialVersionUIDs(URL jar, TreeMap classVersionMap, ClassLoader cl, String pkgPrefix) throws IOException { String jarName = jar.getFile(); JarFile jf = new JarFile(jarName); Enumeration entries = jf.entries(); while (entries.hasMoreElements()) { JarEntry entry = (JarEntry) entries.nextElement(); String name = entry.getName(); if (name.endsWith(".class") && name.startsWith(pkgPrefix)) { name = name.substring(0, name.length() - 6); String classname = name.replace('/', '.'); try { log.fine("Creating ClassVersionInfo for: " + classname); ClassVersionInfo cvi = new ClassVersionInfo(classname, cl); log.fine(cvi.toString()); if (cvi.getSerialVersion() != 0) { ClassVersionInfo prevCVI = (ClassVersionInfo) classVersionMap.put(classname, cvi); if (prevCVI != null) { if (prevCVI.getSerialVersion() != cvi.getSerialVersion()) { log.severe("Found inconsistent classes, " + prevCVI + " != " + cvi + ", jar: " + jarName); } } if (cvi.getHasExplicitSerialVersionUID() == false) { log.warning("No explicit serialVersionUID: " + cvi); } } } catch (OutOfMemoryError e) { log.log(Level.SEVERE, "Check the MaxPermSize", e); } catch (Throwable e) { log.log(Level.FINE, "While loading: " + name, e); } } } jf.close(); }
From source file:com.cyberway.issue.crawler.extractor.ExtractorURI.java
/** * Consider a single Link for internal URIs * //from www . jav a 2s . c om * @param curi CrawlURI to add discoveries to * @param wref Link to examine for internal URIs */ protected void extractLink(CrawlURI curi, Link wref) { UURI source = UURI.from(wref.getDestination()); if (source == null) { // shouldn't happen return; } List<String> found = extractQueryStringLinks(source); for (String uri : found) { try { curi.createAndAddLink(uri, Link.SPECULATIVE_MISC, Link.SPECULATIVE_HOP); numberOfLinksExtracted++; } catch (URIException e) { LOGGER.log(Level.FINE, "bad URI", e); } } // TODO: consider path URIs too }
From source file:org.apache.cxf.dosgi.topologymanager.ListenerHookImpl.java
public void removed(Collection listeners) { LOG.log(Level.FINE, "ListenerHookImpl: removed: {0}", listeners); for (Object li : listeners) { ListenerInfo listenerInfo = (ListenerInfo) li; LOG.log(Level.FINEST, "ListenerHookImpl: filter = {0}", listenerInfo.getFilter()); // TODO: determine if service was handled ? tm.removeServiceInterest(listenerInfo.getFilter()); }/*from ww w. j a v a 2 s. co m*/ }
From source file:fr.ortolang.diffusion.runtime.engine.task.ImportProfilesTask.java
@Override public void executeTask(DelegateExecution execution) throws RuntimeEngineTaskException { checkParameters(execution);// ww w .jav a2 s .c o m String profilespath = execution.getVariable(PROFILES_PATH_PARAM_NAME, String.class); boolean overwrite = false; if (execution.hasVariable(PROFILES_OVERWRITE_PARAM_NAME)) { overwrite = Boolean.parseBoolean(execution.getVariable(PROFILES_OVERWRITE_PARAM_NAME, String.class)); } ObjectMapper mapper = new ObjectMapper(); mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); try { List<JsonProfile> profiles = Arrays .asList(mapper.readValue(new File(profilespath), JsonProfile[].class)); LOGGER.log(Level.FINE, "- starting import profiles"); boolean partial = false; boolean exists; StringBuilder report = new StringBuilder(); for (JsonProfile profile : profiles) { exists = false; try { getMembershipService().readProfile(profile.pro_login); LOGGER.log(Level.FINE, " profile already exists for username: " + profile.pro_login); exists = true; } catch (KeyNotFoundException | AccessDeniedException | MembershipServiceException e) { // } if (!exists) { try { getMembershipService().createProfile(profile.pro_login, profile.pro_firstname, profile.pro_lastname, profile.pro_emailt, ProfileStatus.ACTIVE); } catch (ProfileAlreadyExistsException | AccessDeniedException | MembershipServiceException e) { partial = true; report.append("creation failed for: ").append(profile.pro_login).append("\r\n"); LOGGER.log(Level.SEVERE, " unable to create profile: " + profile.pro_login, e); } } if (exists && overwrite) { try { getMembershipService().updateProfile(profile.pro_login, profile.pro_firstname, profile.pro_lastname, profile.pro_emailt, null); } catch (KeyNotFoundException | AccessDeniedException | MembershipServiceException e) { partial = true; report.append("update failed for existing profile: ").append(profile.pro_login) .append("\r\n"); LOGGER.log(Level.SEVERE, " unable to update profile: " + profile.pro_login, e); } } if (!exists || (exists && overwrite)) { try { if (profile.pro_genre != null && profile.pro_genre.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "civility", profile.pro_genre, ProfileDataVisibility.EVERYBODY, ProfileDataType.ENUM, ""); } if (profile.pro_titre != null && profile.pro_titre.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "title", profile.pro_titre, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_firstname != null && profile.pro_firstname.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "given_name", profile.pro_firstname, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_lastname != null && profile.pro_lastname.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "family_name", profile.pro_lastname, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_emailt != null && profile.pro_emailt.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "professional_email", profile.pro_emailt, ProfileDataVisibility.EVERYBODY, ProfileDataType.EMAIL, ""); } if (profile.pro_email != null && profile.pro_email.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "rescue_email", profile.pro_email, ProfileDataVisibility.EVERYBODY, ProfileDataType.EMAIL, ""); } if (profile.pro_organisme != null && profile.pro_organisme.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "organisation", profile.pro_organisme, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_metier != null && profile.pro_metier.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "job", profile.pro_metier, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_domaine_recherche != null && profile.pro_domaine_recherche.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "field_of_research", profile.pro_domaine_recherche, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } String address = profile.pro_adresse + ", " + profile.pro_cp + ", " + profile.pro_ville + ", " + profile.pro_pays_nom; if (address.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "address", address, ProfileDataVisibility.EVERYBODY, ProfileDataType.ADDRESS, ""); } if (profile.pro_organisme_url != null && profile.pro_organisme_url.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "website", profile.pro_organisme_url, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_telephonet != null && profile.pro_telephonet.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "professional_tel", profile.pro_telephonet, ProfileDataVisibility.EVERYBODY, ProfileDataType.TEL, ""); } if (profile.pro_telephone != null && profile.pro_telephone.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "tel", profile.pro_telephone, ProfileDataVisibility.EVERYBODY, ProfileDataType.TEL, ""); } if (profile.pro_telecopie != null && profile.pro_telecopie.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "fax", profile.pro_telecopie, ProfileDataVisibility.EVERYBODY, ProfileDataType.TEL, ""); } if (profile.pro_langue != null && profile.pro_langue.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "language", profile.pro_langue, ProfileDataVisibility.EVERYBODY, ProfileDataType.ENUM, ""); } if (profile.pro_id_orcid != null && profile.pro_id_orcid.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "orcid", profile.pro_id_orcid, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_id_viaf != null && profile.pro_id_viaf.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "viaf", profile.pro_id_viaf, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_id_idref != null && profile.pro_id_idref.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "myidref", profile.pro_id_idref, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } if (profile.pro_id_linkedin != null && profile.pro_id_linkedin.length() > 0) { getMembershipService().setProfileInfo(profile.pro_login, "linkedin", profile.pro_id_linkedin, ProfileDataVisibility.EVERYBODY, ProfileDataType.STRING, ""); } } catch (KeyNotFoundException | AccessDeniedException | MembershipServiceException e) { partial = true; report.append("unable to set info for profile: ").append(profile.pro_login).append("\r\n"); LOGGER.log(Level.SEVERE, " unable to set profile info for identifier: " + profile.pro_login, e); } } } if (partial) { throwRuntimeEngineEvent(RuntimeEngineEvent.createProcessLogEvent(execution.getProcessBusinessKey(), "Some profiles has not been imported (see trace for detail)")); throwRuntimeEngineEvent(RuntimeEngineEvent .createProcessTraceEvent(execution.getProcessBusinessKey(), report.toString(), null)); } throwRuntimeEngineEvent(RuntimeEngineEvent.createProcessLogEvent(execution.getProcessBusinessKey(), "Import Profiles done")); } catch (IOException e) { throw new RuntimeEngineTaskException("error parsing json file: " + e.getMessage()); } }
From source file:org.jboss.arquillian.container.was.wlp_remote_8_5.WLPRestClient.java
/** * Uses the rest api to upload an application binary to the dropins folder * of WLP to allow the server automatically deploy it. * // w w w . j a v a 2s . co m * @param archive * @throws ClientProtocolException * @throws IOException */ public void deploy(File archive) throws ClientProtocolException, IOException { if (log.isLoggable(Level.FINER)) { log.entering(className, "deploy"); } String deployPath = String.format("${wlp.user.dir}/servers/%s/dropins/%s", configuration.getServerName(), archive.getName()); String serverRestEndpoint = String.format("https://%s:%d%s%s", configuration.getHostName(), configuration.getHttpsPort(), FILE_ENDPOINT, URLEncoder.encode(deployPath, UTF_8)); HttpResponse result = executor.execute(Request.Post(serverRestEndpoint).useExpectContinue() .version(HttpVersion.HTTP_1_1).bodyFile(archive, ContentType.DEFAULT_BINARY)).returnResponse(); if (log.isLoggable(Level.FINE)) { log.fine("While deploying file " + archive.getName() + ", server returned response: " + result.getStatusLine().getStatusCode()); } if (!isSuccessful(result)) { throw new ClientProtocolException( "Could not deploy application to server, server returned response: " + result); } if (log.isLoggable(Level.FINER)) { log.exiting(className, "deploy"); } }
From source file:net.daboross.bukkitdev.skywars.kits.SkyKitConfiguration.java
private void load() throws IOException, InvalidConfigurationException { SkyStatic.debug("Loading kits"); Path kitFile = plugin.getDataFolder().toPath().resolve("kits.yml"); if (!Files.exists(kitFile)) { plugin.saveResource("kits.yml", true); }/*from w w w .j a va 2 s . c om*/ YamlConfiguration config = new YamlConfiguration(); config.load(kitFile.toFile()); if (config.getInt("configuration-version") <= 1) { if (config.getInt("configuration-version") <= 0) { updateVersion0To1(config); } updateVersion1To2(config); config.options().header(String.format(KIT_HEADER)).indent(2); config.save(kitFile.toFile()); } for (String key : config.getKeys(false)) { if (key.equals("configuration-version")) continue; if (config.isConfigurationSection(key)) { SkyKit kit; try { kit = SkyKitDecoder.decodeKit(config.getConfigurationSection(key), key); } catch (SkyConfigurationException ex) { plugin.getLogger().log(Level.SEVERE, "Error loading kit! " + key + " won't be accessible until this is fixed!", ex); continue; } if (kit.getCost() != 0 && plugin.getEconomyHook() == null) { plugin.getLogger().log(Level.FINE, "Not enabling kit {0} due to it having a cost and economy support not being enabled.", key); disabledKits.add(kit); continue; } kits.put(ChatColor.stripColor(key.toLowerCase()), kit); SkyStatic.debug("Loaded kit %s", kit); } else { plugin.getLogger().log(Level.WARNING, "There is a non-kit value in the kits.yml file ''{0}''.", config.get(key)); } } }
From source file:net.e2.bw.idreg.client.keycloak.KeycloakClient.java
/** {@inheritDoc} */ public void redirectToAuthServer(HttpServletResponse response, String callbackUrl) throws IOException { // Create a state code used for Cross-Site Request Forgery (CSRF, XSRF) prevention String state = OIDCUtils.getStateCode(); // Set up cookie used for Cross-Site Request Forgery (CSRF, XSRF) prevention Cookie cookie = new Cookie(OAUTH_TOKEN_REQUEST_STATE, state); //cookie.setSecure(isSecure); cookie.setPath("/"); response.addCookie(cookie);/*from w ww .j a v a 2 s .c o m*/ // Redirect to the authentication request String url = config.getAuthRequest(callbackUrl, state); log.log(Level.FINE, "Redirecting to auth request: " + url); response.sendRedirect(url); }
From source file:org.openspaces.focalserver.FocalServer.java
/** * Logs registration events from the local mbeanserver *//*w ww. j a v a 2 s . co m*/ public void handleNotification(Notification notification, Object object) { if (notification instanceof MBeanServerNotification) { Logger logger = Logger.getLogger(FocalServer.class.getName()); MBeanServerNotification mBeanServerNotification = (MBeanServerNotification) notification; if (mBeanServerNotification.getType().equals(MBeanServerNotification.REGISTRATION_NOTIFICATION)) { ObjectName beanName = mBeanServerNotification.getMBeanName(); logger.log(Level.FINE, "Registered:" + beanName); } else { logger.log(Level.FINE, "Unregistered:" + mBeanServerNotification.getMBeanName()); } } }
From source file:eu.edisonproject.training.wsd.DisambiguatorImpl.java
/** * * @param candidateTermsFile//from w w w .j ava 2s .c o m * @return * @throws IOException * @throws FileNotFoundException * @throws ParseException */ @Override public List<Term> disambiguateTerms(String candidateTermsFile) throws IOException, FileNotFoundException, ParseException { LOGGER.log(Level.FINE, "filterredDictionary: {0}", candidateTermsFile); this.candidateTermsFile = candidateTermsFile; List<Term> terms = new ArrayList<>(); File dictionary = new File(candidateTermsFile); int count = 0; int lineCount = 1; try (BufferedReader br = new BufferedReader(new FileReader(dictionary))) { for (String line; (line = br.readLine()) != null;) { // LOGGER.log(Level.FINE, "line: {0}", line); if (lineCount >= getLineOffset()) { String[] parts = line.split(","); String term = parts[0]; // Integer score = Integer.valueOf(parts[1]); if (term.length() >= 1) { count++; if (count > getLimit()) { break; } LOGGER.log(Level.INFO, "Processing: {0} at line: {1} of " + getLimit(), new Object[] { line, lineCount }); Term tt = getTerm(term); if (tt != null) { terms.add(tt); } } } lineCount++; } } catch (Exception ex) { LOGGER.log(Level.WARNING, "Failed while processing line: " + lineCount + " from: " + candidateTermsFile, ex); } finally { return terms; } }