Select to view content in your preferred language

Modification in diagnostic monitor for searching the message .net sdk

299
1
04-26-2023 04:22 AM
newbiedotnetguy
New Contributor III

 

Hi,

Diagnostic monitor logs multiple type of messages. We are logging our own custom messages as well. Now we need the capability to find our own specific message based on some filter values. One way is to add some prefix at the beginning of our own messages and then find the messages based on that prefix.

But is there any other way in ArcGIS Pro where we can add kind of custom filters to find out specific messages?

@Wolf  @UmaHarano @GKmieliauskas 

Tags (1)
0 Kudos
1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

I use a helper method to output my event log info that is prefixing the output string with the assembly's name (i.e. Add-in name):

internal static void WriteWarning (string line) => ArcGIS.Desktop.Framework.Utilities.EventLog.Write
          (ArcGIS.Desktop.Framework.Utilities.EventLog.EventType.Warning,
          $@"{System.Reflection.Assembly.GetExecutingAssembly().FullName.Split(',')[0]}: {line}");

Then I can filter using my Add-in name 'TableViewerTest':

Wolf_0-1682520257676.png

 

0 Kudos