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:Main.java

public static void main(String[] argv) {
    Logger logger = Logger.getLogger("com.mycompany.MyClass");
    try {/*from   ww w. j  a v a 2  s .c  om*/
        throw new IOException();
    } catch (Throwable e) {
        logger.log(Level.SEVERE, "Uncaught exception", e);
    }
    Exception ex = new IllegalStateException();
    logger.throwing("Main class", "myMethod", ex);
}

From source file:Main.java

public static void main(String args[]) throws Exception {
    Logger logger = Logger.getLogger("your.logging");
    ConsoleHandler handler = new ConsoleHandler();
    MemoryHandler mHandler = new MemoryHandler(handler, 10, Level.ALL);
    logger.addHandler(mHandler);//  w w  w  .java 2  s.  c  om
    logger.setUseParentHandlers(false);
    LogRecord record1 = new LogRecord(Level.SEVERE, "This is SEVERE level message");
    LogRecord record2 = new LogRecord(Level.WARNING, "This is WARNING level message");
    logger.log(record1);
    logger.log(record2);
}

From source file:br.com.fabianoabreu.sendEmail.EnvioTest.java

public static void main(String[] args) {

    Email envio = new Email();
    try {//  w w w .j a  v  a 2s .c om
        envio.sendEmail();
    } catch (EmailException ex) {
        Logger.getLogger(EnvioTest.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:MainClass.java

public static void main(String[] args) {
    lgr.setLevel(Level.SEVERE);
    System.out.println("com level: SEVERE");
    logMessages();//from  w w  w .j  av a2s . co  m
    util.setLevel(Level.FINEST);
    test.setLevel(Level.FINEST);
    rand.setLevel(Level.FINEST);
    System.out.println("individual loggers set to FINEST");
    logMessages();
    lgr.setLevel(Level.SEVERE);
    System.out.println("com level: SEVERE");
    logMessages();

}

From source file:ru.elcor.mis.scheduler.point.EndPoint.java

public static void main(String[] args) {
    try {//w w  w  . j  a v  a 2  s .  c  o  m
        doit();
    } catch (InterruptedException ex) {
        Logger.getLogger(EndPoint.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:model.TestJSON.java

public static void main(String[] Args) {
    try {/*from   w  ww .  j  a  va 2s .com*/
        JSONObject jo = new JSONObject();
        jo.put("num_sala", 1);
        jo.put("num_tavolo", 2);
        jo.put("num_commensali", 10);
        jo.put("id_ordine", 10222);
        System.out.println(jo.toString());
    } catch (JSONException ex) {
        Logger.getLogger(TestJSON.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.bigdata.hbaseConsultor.Consultor.java

/**
 * @param args the command line arguments
 *//*from w  ww .  j  a v a 2s .com*/
public static void main(String[] args) {
    String table = "syslog";
    HBase hb = new HBase(new GenericObjectPool<>(new ConexionFactory()), "syslog");
    try {
        hb.getFilterRows();
    } catch (Exception ex) {
        Logger.getLogger(Consultor.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:minecrunch_updater.Minecrunch_updater.java

/**
 * @param args the command line arguments
 *//*from   w  w w .  j  av  a2  s . c o  m*/
public static void main(String[] args) {
    try {
        VersionCheck();
    } catch (MalformedURLException ex) {
        Logger.getLogger(Minecrunch_updater.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:medical.Medical.java

/**
 * @param args the command line arguments
 *///from  w  w w .ja va  2  s  .  com

public static void main(String[] args) throws IOException, ClientProtocolException, JSONException {
    // TODO code application logic here

    try {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Medical.class.getName()).log(Level.SEVERE, null, ex);
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Medical.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Medical.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Medical.class.getName()).log(Level.SEVERE, null, ex);
    }
    FrameCita cita = new FrameCita();
    cita.setVisible(true);
}

From source file:edu.eci.arsw.aop.spring.idol.MainProgram.java

/**
 * @param args the command line arguments
 */// w w w  . ja va 2 s.  c  o m
public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("spring-simple-idol.xml");
    Performer pf = (Performer) ac.getBean("eddie");
    try {
        pf.perform();
    } catch (PerformanceException ex) {
        Logger.getLogger(MainProgram.class.getName()).log(Level.SEVERE, null, ex);
    }
}