List of usage examples for java.util.logging Level WARNING
Level WARNING
To view the source code for java.util.logging Level WARNING.
Click Source Link
From source file:org.apache.cxf.transport.https.httpclient.PublicSuffixMatcherLoader.java
public static PublicSuffixMatcher getDefault() { if (defaultInstance == null) { synchronized (PublicSuffixMatcherLoader.class) { if (defaultInstance == null) { final URL url = PublicSuffixMatcherLoader.class.getResource("/mozilla/public-suffix-list.txt"); if (url != null) { try { defaultInstance = load(url); } catch (IOException ex) { // Should never happen if (LOG.isLoggable(Level.WARNING)) { LOG.log(Level.WARNING, "Failure loading public suffix list from default resource", ex); }/*from www. j a va 2s . c om*/ } } else { defaultInstance = new PublicSuffixMatcher(Arrays.asList("com"), null); } } } } return defaultInstance; }
From source file:to.sparks.mtgox.service.SocketListener.java
@Override public void onConnect() { logger.log(Level.WARNING, "Connect"); }
From source file:beans.BL.java
public BL() { try {/*from w w w.j a v a 2s .c om*/ emf = Persistence.createEntityManagerFactory("GPSPU"); em = emf.createEntityManager(); } catch (PersistenceException ex) { System.out.println("PersistenceEx +-+-+-+-+-+-+-+-+-+"); LOGGER.log(Level.WARNING, "Fehler ", ex); System.out.println(ex.toString()); reconnecting = true; } data_manager = new DataManager(); track = new Track(LocalDateTime.now(), 1234); tracks.add(track); saveThread = new saveThread(); saveThread.start(); }
From source file:jenkins.plugins.extracolumns.LastJobConfigurationModificationColumn.java
public String getInfo(Job<?, ?> job) { XmlFile config = job.getConfigFile(); if (config == null || !config.exists()) { return "N/A"; }/*from w w w .ja v a 2 s.co m*/ try { long lm = config.getFile().lastModified(); return FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss").format(new Date(lm)); } catch (Exception e) { LOGGER.log(Level.WARNING, "Cannot read last modification date of configuration for job '" + job.getName() + "'.", e); return "N/A"; } }
From source file:com.novartis.pcs.ontology.service.graph.DOTProcessImpl.java
@PostConstruct protected void init() { ProcessBuilder processBuilder = new ProcessBuilder(Arrays.asList(dotPath, "-Tsvg")); try {/*from ww w .j a v a 2 s. c o m*/ process = processBuilder.start(); buffer = new byte[262144]; count = 0; skip = new int[256]; } catch (IOException e) { String msg = "Failed to start dot process"; logger.log(Level.WARNING, msg, e); throw new RuntimeException(msg, e); } }
From source file:net.dmulloy2.swornrpg.modules.MobKills.java
@Override public void loadSettings() { setEnabled(plugin.getConfig().getBoolean("levelingMethods.mobKills.enabled", true)); this.xpGain = plugin.getConfig().getInt("levelingMethods.mobKills.xpgain", 5); this.tiers = new HashMap<>(); if (plugin.getConfig().isSet("mobTiers")) { Set<String> keys = plugin.getConfig().getConfigurationSection("mobTiers").getKeys(false); for (String key : keys) { try { int tier = Integer.parseInt(key); List<String> names = plugin.getConfig().getStringList("mobTiers." + tier); tiers.put(tier, names);/* w ww .j a va 2s.c o m*/ } catch (NumberFormatException ex) { plugin.getLogHandler().log(Level.WARNING, "\"{0}\" is not a number in mobTiers"); } } } else { tiers.put(3, ListUtil.toList("wither", "ender dragon", "elder guardian")); tiers.put(2, ListUtil.toList("creeper", "enderman", "iron golem", "skeleton", "blaze", "zombie", "spider", "ghast", "magma cube", "witch", "guardian", "shulker")); } }
From source file:org.sonatype.nexus.test.utils.hc4client.Hc4ClientHelper.java
@Override public HttpClientCall create(Request request) { HttpClientCall result = null;//from ww w. java 2 s. c o m try { result = new Hc4MethodCall(this, request.getMethod().toString(), request.getResourceRef().toString(), request.isEntityAvailable()); } catch (IOException ioe) { getLogger().log(Level.WARNING, "Unable to create the HTTP client call", ioe); } return result; }
From source file:br.gov.sc.fatma.resourcemanager.commands.SiteCheckIfUPCommand.java
@Override public Status execute() { Logger.getLogger(SiteCheckIfUPCommand.class.getName()).log(Level.FINE, "-------- " + _site.getPath() + " Connection Testing ------"); Status result;/*from w ww. j av a2 s. c o m*/ CloseableHttpClient httpclient = HttpClients.createDefault(); try { HttpGet httpget = new HttpGet(_site); Logger.getLogger(SiteCheckIfUPCommand.class.getName()).log(Level.INFO, "Executing request " + httpget.getRequestLine()); ResponseHandler<String> responseHandler = new BasicResponseHandler() { @Override public String handleResponse(final HttpResponse response) throws ClientProtocolException, IOException { int status = response.getStatusLine().getStatusCode(); if (status >= 200 && status < 300) { return "200"; } else { return String.valueOf(status); } } }; String responseBody = httpclient.execute(httpget, responseHandler); result = new Status(responseBody.equals("200"), "", Integer.valueOf(responseBody)); } catch (IOException ex) { Logger.getLogger(SiteCheckIfUPCommand.class.getName()).log(Level.WARNING, ex.getMessage(), ex); ex.printStackTrace(); result = new Status(false, ex.getMessage(), -1); } finally { try { httpclient.close(); } catch (IOException ex) { } } return result; }
From source file:hudson.lifecycle.Lifecycle.java
/** * Gets the singleton instance.//from w w w . ja v a 2 s. co m * * @return never null */ public synchronized static Lifecycle get() { if (INSTANCE == null) { String p = System.getProperty("hudson.lifecycle"); if (p != null) { try { ClassLoader cl = Hudson.getInstance().getPluginManager().uberClassLoader; INSTANCE = (Lifecycle) cl.loadClass(p).newInstance(); } catch (InstantiationException e) { InstantiationError x = new InstantiationError(e.getMessage()); x.initCause(e); throw x; } catch (IllegalAccessException e) { IllegalAccessError x = new IllegalAccessError(e.getMessage()); x.initCause(e); throw x; } catch (ClassNotFoundException e) { NoClassDefFoundError x = new NoClassDefFoundError(e.getMessage()); x.initCause(e); throw x; } } else { // if run on Unix, we can do restart if (!Hudson.isWindows()) { try { INSTANCE = new UnixLifecycle(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to install embedded lifecycle implementation", e); } } // use the default one. final fallback. if (INSTANCE == null) INSTANCE = new Lifecycle() { }; } } return INSTANCE; }
From source file:dataHandlers.AccessFacebook.java
private static List<String> extractArtistFromPost(List<Post> postList, User user) { List<String> recentArtistList = new ArrayList<>(); int postCount = 0; int maxPostCount = GlobalParam.getPostCountPerUser(); LOGGER.log(Level.WARNING, "Some music information may not contain artist information"); for (Post post : postList) { String stringURL = BASE_URL + post.getId() + "/attachments?access_token=" + ((UserFacebook) user).getAccessToken(); try {// w w w .j a v a 2s . c o m URL url = new URL(stringURL); URLConnection respons = url.openConnection(); String stringRespons = responsToString(respons); JSONArray jArray = new JSONArray(stringRespons.substring(8, stringRespons.length() - 1)); JSONObject dataObject = jArray.getJSONObject(0); recentArtistList.add(dataObject.getString("description")); postCount++; } catch (IOException e) { LOGGER.log(Level.INFO, "Responce for " + post.getId() + " is broken or unavailable"); } catch (Exception e) { LOGGER.log(Level.INFO, "Post " + post.getId() + " dose not contains any aritist information"); } } return recentArtistList; }