title: log4j custom log level and properties file
body: <p>I have the following custom logging level</p>
  
  <pre><code>public class SAMLLoggingLevel extends Level{
  
  public static final String SAMLLOGGING_LEVEL = "SAMLLOGGING";
  public static final Level SAML_EXCEPTION_LOGGING = new SAMLLoggingLevel(FATAL_INT + 1, SAMLLOGGING_LEVEL, 7);
  public static final Level SAML_DEBUG_LOGGING = new SAMLLoggingLevel(DEBUG_INT+1, SAMLLOGGING_LEVEL, 7);
  public static final Level SAML_ERROR_LOGGING = new SAMLLoggingLevel(ERROR_INT+1, SAMLLOGGING_LEVEL, 7);
  
  protected SAMLLoggingLevel(int level, String levelStr, int syslogEquivalent) {
      super(level, levelStr, syslogEquivalent);
  }
  }
  </code></pre>
  
  <p>I try to log using the following</p>
  
  <pre><code>public static Logger logger = Logger.getLogger(xyz.class);
  
  logger.log(SAMLLoggingLevel.SAML_DEBUG_LOGGING, "logger SAML_DEBUG_LOGGING");
  logger.log(SAMLLoggingLevel.SAML_ERROR_LOGGING, "logger SAML_ERROR_LOGGING");
  logger.log(SAMLLoggingLevel.SAML_EXCEPTION_LOGGING, "logger SAML_EXCEPTION_LOGGING");
  </code></pre>
  
  <p>my log4j.properteis file looks like this</p>
  
  <pre><code>log4j.logger.com.xyz=SAML_DEBUG_LOGGING, SAMLLoggingLevel
  log4j.appender.SAMLLoggingLevel=org.apache.log4j.RollingFileAppender
  log4j.appender.SAMLLoggingLevel.File=/SAML.log
  log4j.appender.SAMLLoggingLevel.layout=org.apache.log4j.PatternLayout
  log4j.appender.SAMLLoggingLevel.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss,SSS zzz} %5p %c{1}:%L - %m%n
  </code></pre>
  
  <p>I get all the debub messages from all classes in com.xyz. I want to restrict only to the once that are logged using logger.log(SAMLLoggingLevel....)</p>