Rule extension logging

If you have a rules extension, it may be useful to utilize logging. You can create a log file for a rules extension by adding the \Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Extensions\Logging.dll reference to your Management Agent project:

Rule extension logging

Then, within your rules extension code, add a logging event similar to this:

Logging.Log("Error in account: " + csentry.DN.ToString(), True, 2)

The three parameters are as follows:

Logging.Log(logMessage, addTimeStamp, loggingLevel)

Here is what they mean:

  • logMessage: This is a string message to write to the log. In the preceding example, we concatenate a ...

Get Microsoft Identity Manager 2016 Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.