What would be the best way to add logging to my Addin? I found the EventLog class in the ArcGIS Pro 2.1 API Reference Guide , but EventLog.IsEnabled is false, and I have no idea how to enable it. Should I use a 3rd party library such as Log4Net?
Solved! Go to Solution.
EventLog is intended for logging when Pro is in diagnostic mode otherwise writing to the log is a no-op. ArcGIS Pro runs in diagnostic mode using the "/enablediagnostics" command line switch. ProConcepts-Framework#diagnostic-mode-event-logging. Output goes to an xml file in My Documents\ArcGIS\Diagnostics
If you want your logging always "on" (not just when Pro is in diagnostic mode) then using another logger is the way to go
EventLog is intended for logging when Pro is in diagnostic mode otherwise writing to the log is a no-op. ArcGIS Pro runs in diagnostic mode using the "/enablediagnostics" command line switch. ProConcepts-Framework#diagnostic-mode-event-logging. Output goes to an xml file in My Documents\ArcGIS\Diagnostics
If you want your logging always "on" (not just when Pro is in diagnostic mode) then using another logger is the way to go