title: Changing the log level programmatically in log4net?
body: <p>Is there a way to set the log level in log4net programmatically? I'd assumed that there would be a property that would let you do this, but I can't seem to find one.</p>
  
  <p>What I want to do is have a configurable option to enter debug mode. which would cause extra logging.</p>
  
  <p>I'm using a separate log4net configuration xml file. At the moment the solutions I've come up with are as follows:</p>
  
  <ol>
  <li><p>Edit the log file using the dom and then call XMLConfigurator to configure the log file as per the file.</p></li>
  <li><p>Have two log configuration files, and on the option changing call xml Configurator to use the appropriate log configuration file.</p></li>
  </ol>
  
  <p>I'm leaning towards 2, is there any reason this wont work?</p>