Select to view content in your preferred language

Logging in ArcGIS Pro Addin

2500
1
Jump to solution
06-13-2018 06:45 AM
BerendVeldkamp
Frequent Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
CharlesMacleod
Esri Regular Contributor

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

View solution in original post

1 Reply
CharlesMacleod
Esri Regular Contributor

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