I am looking for way where I can decouple the logging logic from code and make it configurable. So that I can turn it OFF on production which gives better performance (reduce the logging effort) when the logging in not required. I turn this ON when I need to see the logging and time taken on each method when there is a performance degrade.
Use case : The API is hosted in Azure and logging the trace through diagnostics logging. So any pointers regarding logging on azure storage to capture the performance counters on time taken of each routine is also highly appreciated.
Your help much appreciated !!!