Logging capabilities of GWM
The created GWM project also follows in the same logging pattern as mentioned in the Logging feature of GWM plugin for Visual Studio section. Apart from the fact that all the required configuration files and even the logger classes are readily available in the generated application as shown below:
You can either choose to use the provided infrastructure for logging, or you can go ahead and write your own logger. If you are using the auto generated logger, then you can control it from the App.config file. The auto generated logger leverages the trace utility already present within .NET framework. You can change the trace listener, or add multiple trace listeners to your code. More information on trace listeners can be found on http://msdn.microsoft.com/en-us/library/4y5y10s7(v=vs.100).aspx .
The below image shows the trace listener that is auto generated for you:
The listener writes to the event viewer and the logs would be located under the application logs.
The key TraceLevel behaves similar to loglevel key mentioned earlier. It determines what information need to be logged. The following are the set of values that key can take:
In case a new logger is implemented all the details in the App.config file may not hold good. It is the responsibility of the developer to modify it appropriately.