Dynamics Crm 2011 Trace Listener for Enterprise Library Logging

If you use Enterprise Library to log information and message in your program and you happen to develop Dynamics CRM related programs, then Dynamics Crm 2011 Trace Listener is a tool to log information and message to Dynamics CRM entity. If you develop systems connected to Dynamics CRM then you can use this tool to have a central place to check the end results including the log.

It is available as NuGet package: http://nuget.org/packages/EnterpriseLibrary.Logging.DynamicsCrm2011

The project site is: http://entlibmscrmlog.codeplex.com/

After installing the NuGet package, there will be a folder added to visual studio project which includes two *.zip file. One is the un-managed Dynamics CRM solution and the other is managed Dynamics CRM solution. These two solutions are the sample except one being managed and the other is not. The solution contains one single entity where all the log information and message are saved.

After import the solution into Dynamics CRM organisation, you need to create a connection string in your web.config/app.config file.

The following is a sample configuration for On Premise Integrated Windows Authentication

<pre><?xml version="1.0" encoding="utf-8" ?>
    <add name="Crm" connectionString="Url=https://domain.com/orgname;"/>

More samples please see project site or http://msdn.microsoft.com/en-us/library/gg695810.aspx

After than you can configure enterprise library logging using the configuration file either manually or using enterprise library configuration tool. It also support configuration through fluent API.


One comment on “Dynamics Crm 2011 Trace Listener for Enterprise Library Logging

  1. Hi Zhou,

    Can you please let me know, how can i write log on a file instead of in Database- i am using the following configuration to write the log in file but Log file is not created.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s