Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:51:42+00:00 2026-06-15T20:51:42+00:00

I want to be able to dynamically control the level of logging my Azure

  • 0

I want to be able to dynamically control the level of logging my Azure cloud-based applications perform. To do this I’m creating a shared log4net-based DLL.

There are lots of questions about log4net logging but almost all of them involve entering and manipulating settings in a config file or other text file. In the Azure cloud, changing the web.config means redeploying. I want to change the logging by making web service calls into the applications from an admin portal.

I also have several applications and I want each to use my new log4net-based DLL without having to store identical settings such as Appender details in each config file. The applications log the same, consistent data.

I do not want to use the Azure diagnostics because this will reduce performance of this large user base application. In addition, I want to reduce logging and diagnostics to a minimum (or disable completely) and only enable them at various levels to debug production problems or take snapshots of their performance. I don’t want to redeploy my apps.

What’s the best approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:51:43+00:00Added an answer on June 15, 2026 at 8:51 pm

    I would recommend not storing log4net configuration in web/app.config files but rather in a different file that can be updated externally (ie: in blob storage) and location of which can be dynamically changed from the Service Config or contents of which can be changed w/o redeploying.

    Look into the log4net.Config.XmlConfigurator.Configure method. You can pass it many different parameters instead of just calling it with no parameters (no parameters default method reads from app.config files).

    One way to do what you want is to pass that Configure method a public URL of a config file stored in your Azure storage. Location of the config file can be controlled from the Service Config.

    Alternatively if you do not want to make the config file public, you can implement your own reader of the XML config from some private location in storage and pass the XML document to the Configure() method instead.

    Check for more information here:
    http://logging.apache.org/log4net/release/manual/configuration.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to dynamically create ViewControllers based on a JSON file.
I want to be able to dynamically mirror a silverlight control. suppose i have
I am creating a control that contains an html5 audio element and I want
I have a custom control and I want the user to be able to
I was able to get jQuery Cycle to dynamically generate the images I want.
I am creating text boxes dynamically. I want to take those text box values
I'm using LaTeX and BibTeX for an article, and I want to able to
Want to be able to provide a search interface for a collection of objects
I want to be able to take an image that i have already captured
I want to be able to replicate only the folder structure (not the contents)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.