title: Stop log4net logging process and remove log file lock
body: <p>I am working on a windows service application that is supposed to run jobs scheduled at specific times. Each job execution cycle is logged using log4net and has its own file per execution(With 5 jobs running for 5 days once a day there will be 25 log files created).</p>
  
  <p>The question is, how do I stop the log4net log file lock so that once the job has finished execution I can email the log file and delete it from the hard drive?</p>
  
  <p>I need to do this programatically, so the config file setting would not work in this case.</p>
  
  <p>I have tried this so far, but it doesn't work:</p>
  
  <pre><code>    logger.Logger.Repository.LevelMap.Clear();
      logger.Logger.Repository.LevelMap.Add(logger.Logger.Repository.LevelMap["OFF"]);
  </code></pre>