Code example for Logger

Methods: getName, isLoggable, log

0
    lr.setLoggerName(sm_logger.getName());
    sm_logger.log(lr);
  } 
 
  private static void logf(Level level, String msg, Object... params) {
    if (!sm_logger.isLoggable(level))
      return; 
    LogRecord lr = new DebugLogRecord(level, String.format(msg, params));
    lr.setLoggerName(sm_logger.getName());
    sm_logger.log(lr);
  } 
 
  @SuppressWarnings("serial") 
public static class DebugLogRecord extends LogRecord {
 
    /** 
     * @serial Class that issued logging call 
     */ 
    private String sourceClassName;
 
    /**