Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Therefore, it is important that you setup a variable for this. The variable should follow the following formatvariables: 

<MainApplicationname>_LOGSTATE 

For instance: 

...

  • LOGSTATE

...

    • TRUE
      The logger will create a log entry
    • FALSE
      The logger will not create any logs at all
  • APP_INSIGHT_KEY
    • Containing the insight key that can be found on the appinsight app hosting page on Azure.

To set the variables one should do the following:

  1. Go to the application hosting where you have implemented logging.
  2. Click on Containers in the left most menu
  3. In the middle of the screen click 'Environment Variables'
  4. Add the variables
  5. Click 'Save as new revision'

The application will restart and is now ready for use.

Code

The Logging functionality can be accessed from the static class simply called Log.cs. 

...