extends java.util.logging.Logger not working
<p>I want to extend the java.util.logging.Logger class.</p>

<p>I have the following code. I am "forcing an error" in our app and the class I created is not being called.</p>

<p>Here is the error I am generating on purpose but it doesn't go in the code I wrote:</p>

<pre><code>//Generate error to test the logger
String[] myStringArray = new String[3];
String test;
test = myStringArray[5];    
</code></pre>

<p>I also tried this but it still doesn't go in my code even if I have the same function definition:</p>

<pre><code>logger.log(Level.FINE, "test my logger");
</code></pre>

<p>Here is my logger extension. Is it possible for this to get triggered when an unhandled exception is "raised".</p>

<pre><code>import java.util.logging.Level;
import java.util.logging.LogRecord;

public class MyLogger extends java.util.logging.Logger
{

    public MyLogger(String name, String resourceBundleName)
    {
        super(name, resourceBundleName);
        runMyLog();
    }


    public void log(Level level, String msg) {
        runMyLog();
    }   

    public void error(String msg)
    {
        super.log(Level.SEVERE, msg);
        runMyLog();
    }

    public void log(LogRecord record)
    {
        super.log(Level.SEVERE, record.getMessage());
        runMyLog();
    }

    public void severe(String msg) {
        log(Level.SEVERE, msg);
        runMyLog();
    }

    public void runMyLog(){
        String str = "lll";

        str="fdsafasdfdasfasd";
    }
}
</code></pre>