Example usage for java.util.logging Level SEVERE

List of usage examples for java.util.logging Level SEVERE

Introduction

In this page you can find the example usage for java.util.logging Level SEVERE.

Prototype

Level SEVERE

To view the source code for java.util.logging Level SEVERE.

Click Source Link

Document

SEVERE is a message level indicating a serious failure.

Usage

From source file:com.fullhousedev.globalchat.bukkit.PluginMessageManager.java

public static void sendRawMessage(String subChannel, String serverName, byte[] message, Plugin pl) {
    ByteArrayOutputStream b = new ByteArrayOutputStream();
    DataOutputStream out = new DataOutputStream(b);

    try {/*w ww.  j a va  2  s  .  c o m*/
        out.writeUTF("Forward");
        out.writeUTF(serverName);
        out.writeUTF(subChannel);

        out.writeShort(message.length);
        out.write(message);
    } catch (IOException ex) {
        Logger.getLogger(GlobalChat.class.getName()).log(Level.SEVERE, null, ex);
    }

    Player p = Bukkit.getOnlinePlayers()[0];

    p.sendPluginMessage(pl, "BungeeCord", b.toByteArray());
}

From source file:fr.francetelecom.callback.ItemReaderHeader.java

@Override
public void handleLine(String string) {
    try {//from   w ww .j a va2  s  .co m
        Object mapLine = lineMapper.mapLine(string, 1);
        System.out.println("header : " + mapLine);
    } catch (Exception ex) {
        Logger.getLogger(ItemReaderHeader.class.getName()).log(Level.SEVERE, null, ex);
    }

}

From source file:BLL.statsService.java

public ArrayList<top> getTop5Gouvernorat() {
    try {/*from www  .jav a2 s.com*/

        return sDAO.getTop5Gouvernorat();

    } catch (SQLException ex) {
        Logger.getLogger(statsService.class.getName()).log(Level.SEVERE, null, ex);
        return null;
    }
}

From source file:ch.newscron.referral.ReferralManager.java

/**
 * Provides a connection to the database specified (see fields)
 * @return a Connection for the database
 *///w ww  .  ja  va 2  s .com
public static Connection connect() {
    try {
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        Connection connection = DriverManager.getConnection(DBurl, username, password);
        return connection;
    } catch (SQLException e) {
        throw new IllegalStateException("Cannot connect the database! ", e);
    } catch (Exception ex) {
        Logger.getLogger(ReferralManager.class.getName()).log(Level.SEVERE, null, ex);
    }
    return null;
}

From source file:io.bluecell.service.GateDocumentServiceTest.java

@BeforeClass
public static void setUpClass() {
    if (!Gate.isInitialised()) {
        Gate.setGateHome(new File("/home/rich/GATE_Developer_8.1"));
        try {/* ww w  . j av  a2s  . c  o m*/
            Gate.init();
        } catch (GateException ex) {
            Logger.getLogger(GateDocumentServiceTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

From source file:atualizador.Atualizador.java

private static void VerificarAtualizacao(String MD5FileName, String SistemaFileName, String DiretorioFTP) {
    try {/*from   w ww . j  av a 2 s.  com*/

        FTPDownload(MD5FileName, DiretorioFTP); //Arquivo TXT com o MD5

        //Le o valor do arquivo
        FileReader arq = new FileReader(MD5FileName);

        BufferedReader lerArq = new BufferedReader(arq);
        String linha = lerArq.readLine();

        String Md5FPT = linha;
        String Md5Local = geraHash(new File(SistemaFileName)); //Mudar o file name 
        if (!ValidaVersao(Md5FPT, Md5Local)) {
            System.out.println("Atualizando");
            FTPDownload(SistemaFileName, DiretorioFTP);
        }

    } catch (NoSuchAlgorithmException | FileNotFoundException ex) {
        Logger.getLogger(Atualizador.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
        Logger.getLogger(Atualizador.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:controller.NewEntryImageControllerTest.java

@AfterClass
public static void tearDownClass() {
    File file = new File(System.getProperty("user.dir") + fSeparator + "MyDiaryBook");
    try {/* w ww  .  j  a v a2s.c o  m*/
        FileUtils.deleteDirectory(file);
    } catch (IOException ex) {
        Logger.getLogger(NewEntryImageControllerTest.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:it.cnr.ilc.ilcioutils.IlcIOUtils.java

/**
 * Read the content from file/* w w  w .java2  s  . co  m*/
 *
 * @param file the file to read from
 * @return a list of lines
 */
public static List<String> readFromFile(File file) {
    List<String> lines = new ArrayList<>();
    String message;
    String encoding = "UTF-8";
    try {
        lines = FileUtils.readLines(file, encoding);

    } catch (Exception e) {
        message = String.format("IOException in reading the file %s %s" + file.getName(), e.getMessage());
        Logger.getLogger(CLASS_NAME).log(Level.SEVERE, message);
    }

    return lines;
}

From source file:fr.cntcnc.migration.html4joomla1to3.CNTparser.java

public static void imprimeurArticles(String listeArticles, String nomFichier) {
    try {//  w ww  .  ja v a 2  s  . c  o m
        //        entre : String[] listeArticles ...   String articleComplet = "";
        //        concatnation des sous article
        //        for (String listeArticle : listeArticles) {
        //            articleComplet+=listeArticle;
        //        }
        FileUtils.writeStringToFile(new File(nomFichier + ".txt"), listeArticles);
        System.out.println("---- Impression de l'article ---" + nomFichier + ".txt");
    } catch (IOException ex) {
        Logger.getLogger(CNTparser.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:ch.newscron.registration.UserRegistration.java

/**
 * Provides a connection to the database specified (see fields)
 * @return a Connection for the database
 *//*  w  w w.j av  a  2  s  .  c om*/
public static Connection connect() {
    try {
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        Connection connection = DriverManager.getConnection(DBurl, username, password);
        return connection;
    } catch (SQLException e) {
        throw new IllegalStateException("Cannot connect the database! ", e);
    } catch (Exception ex) {
        Logger.getLogger(UserRegistration.class.getName()).log(Level.SEVERE, null, ex);
    }
    return null;
}