title: Changing logging level in log4net xml
body: <p>I've a c# 3.5 winforms desktop app running on production server.It uses log4net for logging.</p>
  
  <p>The requirement is that the user should be able to switch the logging level at run time...for eg:if the level is switched to "INFO" level, then app shud write only info level logs.
  Also, the business does not want to change the log level by going on to prod server and editing the log4net xml file.</p>
  
  <p>Which one of the following approaches would be ok for this?Or is there any other better approach?
  Have an "Admin" winform which will enable the user to change the log level.
  The user will be logging on to app from their desktop.</p>
  
  <p>1.And then In the app, I can load log4net xml from the network path using log4net api, save the changes with the new level provided from the UI and then re-instantiate the logger class with the new level.</p>
  
  <p>or</p>
  
  <p>2.Have 2 new tables in the backend....a look up table "A" with the level Ids and Names.And another table "B" with user name, current level id and date modified.</p>
  
  <p>Update the level provided from UI screen in table B.
  Using .net's Sqlcachedependency, whenever the value in the table B changes,re-instantiate the logger class with the new level.</p>
  
  <p>Thanks.</p>