List of usage examples for java.util.logging Logger throwing
public void throwing(String sourceClass, String sourceMethod, Throwable thrown)
From source file:Main.java
public static void main(String[] argv) { Logger logger = Logger.getLogger("com.mycompany.MyClass"); try {/*from ww w . j a va 2s .c o m*/ throw new IOException(); } catch (Throwable e) { logger.log(Level.SEVERE, "Uncaught exception", e); } Exception ex = new IllegalStateException(); logger.throwing("Main class", "myMethod", ex); }