Tuesday, August 5, 2008

CRM 4.0 E-Mail Connector Logger Tool

Published Wednesday, July 02, 2008 2:19 PM by benlec

Hi all,

 

I’ve just made this tool to easily enable logging for the E-Mail Connector in CRM 4.0

The logging for the connector can be enabled by modifying the configuration file for the service like explained in this article:

 

http://blogs.msdn.com/benlec/archive/2008/03/25/how-to-implement-logging-for-the-microsoft-crm-4-0-e-mail-connector.aspx

 

The tool looks like this:

 

CRM 4.0 E-Mail Connector Logger GUI

 

It’s based on XPath to read and modify the Config File.

 

Here is how it works:

1°) Execute the tool on the E-Mail Connector box, it will detect and read the config file.

2°) The drop down list you see shows you the Deployment you have configured, you need to select one of these.

3°) Once the deployment is selected, it will retrieve the different profiles you configured (Incoming Users & Queues, Forward Mailbox and Outgoing profile)

4°) You can select the section you want to activate logging for. If you need to only activate logging for Incoming E-Mail on Peter Chimaera, then select the 1st Checkbox only and select Peter from the Drop down.

5°) Choose a FileName (there will be a default filename proposed) and a LogLevel.

6°) Click [Enable Logging]

 

Important Notes:

- Don’t close the tool once you enabled logging. It will STOP the logging. (it has some dialog box which reminds you the usage anyways)

- One you are done with your tests, click [Stop Logging]

- The log files will be placed in the SAME folder as the Microsoft.Crm.Tool.EmailAgent.xml file

- There will be no update of the Configuration during the test (if in the meantime a new user is configured, it will not take it in consideration) because once you click [Enable Logging] the tool will set the ConfigUpdatePeriod to ZERO to prevent any unexpected update during the test (to prevent cancelling logging).

 

Risks:

- There should be no risks to do this because the tool automatically Create a backup of the EmailAgentXML when we attempt to Enable Logging.

If an unexpected error occurs, the backup will be restored. The backup is restored also if you exit the application….

- You can run it if the EmailAgentXML has already been modified because it will check if the LogLevel and LogFile tag exists already or not and will either modify or create the tags accordingly.


Regards

Benjamin

No comments: