Tips
Turning Log4net on/off programmatically
to turn it off
log4net.LogManager.GetRepository().Threshold= log4net.LogManager.GetRepository().LevelMap["OFF"];
to turn it on
log4net.LogManager.GetRepository().Threshold= log4net.LogManager.GetRepository().LevelMap["ALL"];