title: How to get loggers in java.util.logging so i can change their log level at runtime?
body: <p>I am using <code>java.util.logging</code> in different classes. The Log Level's default value is <code>INFO</code>. For example in one class <code>Class1</code> it is setup this way:</p>
  
  <pre><code>import java.util.logging.Handler;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  public class Class1 {
     private static final Logger LOGGER = Logger.getLogger(Class1.class.getName());
     static {
         LOGGER.setLevel(Level.INFO);
         for (Handler handler : LOGGER.getHandlers()) {
             handler.setLevel(Level.INFO);
         }           
     }
     ...
  }
  </code></pre>
  
  <p>The above is the same way it is setup in different classes. </p>
  
  <p>Now the Log Level could be changed at runtime. For example suppose it is changed to <code>FINEST</code> at runtime. In this case I want to get all the loggers which have been created so far and then change their Log Level to <code>FINEST</code>. How can I do that? I was thinking about creating another class say <code>LogRepository</code> which has a <code>java.util.List</code> and whenever a LOGGER is created, I add it into the <code>java.util.List</code> of <code>LogRepository</code>. But I think there may be another better way. </p>