List of usage examples for java.util.logging Level SEVERE
Level SEVERE
To view the source code for java.util.logging Level SEVERE.
Click Source Link
From source file:com.bluepandora.therap.donatelife.service.CheckService.java
public static boolean isValidUser(String mobileNumber, String hashKey, DatabaseService dbService) { String query = GetQuery.getValidUserQuery(mobileNumber, hashKey); // Debug.debugLog("VALID USER QUERY: ", query); ResultSet result = dbService.getResultSet(query); boolean USER_VALID = false; try {/*w w w . j a v a 2 s.c o m*/ while (result.next()) { USER_VALID = true; } } catch (SQLException error) { Logger.getLogger(CheckService.class.getName()).log(Level.SEVERE, null, error); } return USER_VALID; }
From source file:com._8x8.data.repository.BroadcastRepository.java
@Override public Boolean sendBroadcastMsg(String msg, String RegisterId, GCM gcm) { String jsonStr = "[ " + " {" + " \"data\": {" + " \"title\": \"Test Title\"," + " \"body\": \"" + msg + "\"" + " }," + " \"to\": \"" + RegisterId + "\"" + " }]"; try {//from w w w .ja v a 2 s .c om JSONArray array = new JSONArray(jsonStr); this.sendGCMHTTPData(array.getJSONObject(0), gcm); } catch (JSONException ex) { Logger.getLogger(BroadcastRepository.class.getName()).log(Level.SEVERE, null, ex); } return true; }
From source file:Gestores.GestorHash.java
public String md5(String plaintext) { String hashtext = ""; try {/*from w w w . ja v a 2 s . com*/ MessageDigest m = MessageDigest.getInstance("MD5"); m.reset(); m.update(plaintext.getBytes()); byte[] digest = m.digest(); BigInteger bigInt = new BigInteger(1, digest); hashtext = bigInt.toString(16); // Now we need to zero pad it if you actually want the full 32 chars. while (hashtext.length() < 32) { hashtext = "0" + hashtext; } } catch (NoSuchAlgorithmException ex) { Logger.getLogger(GestorHash.class.getName()).log(Level.SEVERE, null, ex); } return hashtext; }
From source file:at.ac.tuwien.dsg.cloudlyra.utils.IOUtils.java
public static void cleanTempData() { String tomcatTempFolder = System.getProperty("java.io.tmpdir"); File dir = new File(tomcatTempFolder); try {// w w w .j av a2 s . com FileUtils.cleanDirectory(dir); } catch (IOException ex) { Logger.getLogger(IOUtils.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.me.DAO.DAO1.java
public Connection getConnection() { Connection conn = null;/*from w w w . ja va 2 s . c o m*/ try { conn = DriverManager.getConnection(dburl, dbuser, dbpassword); } catch (SQLException ex) { Logger.getLogger(DAO1.class.getName()).log(Level.SEVERE, null, ex); } return conn; }
From source file:net.daboross.bukkitdev.skywars.api.translations.SkyTrans.java
/** * Gets the translation for the given key and the given arguments. * * @param key The key to search for a translation of. * @param args The arguments to apply to the translation. * @return The final message to be given in game. *///from www.ja va 2 s. co m public static String get(TransKey key, Object... args) { Validate.notNull(key, "Key cannot be null"); if (instance == null) { return "translation-not-found[" + key.key + "]"; } if (key.args == 0) { return instance.get(key); } else if (key.args > args.length) { throw new IllegalArgumentException("Not enough args for key " + key.key); } else if (key.args < args.length) { throw new IllegalArgumentException("Too many args for key " + key.key); } else { String format = instance.get(key); try { return String.format(format, args); } catch (IllegalFormatException ex) { SkyStatic.getLogger().log(Level.SEVERE, "Translation format error. Key is '" + key.key + ", format string is '" + format + "', stacktrace:", ex); return String.format("invalid-message-format[%s][%s]", key.key, format); } } }
From source file:monitoring.Monitoring.java
public boolean updateContainer(int container, int ram, int cpu, int disk) { try {// w ww .ja va2s . c om Process execute; String command; if (cpu == 0) { command = "/root/scripts/update_container.sh " + container + " " + ram; } else { command = "/root/scripts/update_container.sh " + container + " " + ram + " " + cpu; } execute = Runtime.getRuntime().exec(command); } catch (IOException ex) { Logger.getLogger(Monitoring.class.getName()).log(Level.SEVERE, null, ex); } return true; }
From source file:com.nuance.expertassistant.ContentExtractor.java
public static void extract(String URL) { try {//from w w w . j av a2 s . c o m final Document doc = Jsoup.connect(URL).timeout(0).get(); extract(doc); } catch (final IOException ex) { Logger.getLogger(ContentExtractor.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.epam.spring.core.logger.FileEventLogger.java
@Override public void logEvent(Event event) { try {/* w w w . jav a 2 s . com*/ FileUtils.writeStringToFile(file, event.toString(), true); } catch (IOException ex) { Logger.getLogger(FileEventLogger.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:ec.edu.espe.distribuidas.web.ReportFacturaBean.java
public void generateReport() { //generar reporte super.pdf("factura", "factura"); try {/*from w ww . j a va 2 s . c o m*/ this.testMultiPartEmail(); } catch (UnsupportedEncodingException | EmailException | MalformedURLException ex) { Logger.getLogger(ReportFacturaBean.class.getName()).log(Level.SEVERE, null, ex); } }