Versions Compared

Key

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

...

  • 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.

Image Added

To set the variables one should do the following:

...

The application will restart and is now ready for use.
Image Removed

Code

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

...

Code Block
firstline1
titleLogger initialization
linenumberstrue
string invoker = "IntegrationApi"; 									    /*The name of the application using the log*/

Log.Initialize(invoker); 												/*Initializing the logger, making it ready for use*/
Log.LogInfo("Integration api started.");								/*Initial message showing that teh logging and application have started*/
Log.LogInfo("Logger running");											

When wanting to create a logentry do the following in the code:

...