Hi,
I am doiong customization for MS CRM and trying to use logging. It has worked for lot of my project but for this .sil file is not getting populated atall. there is no error also reported for this. i am referring correct version of dll. I am just confused as to whats wrong?
any idea why will the logging not working?
Regards,
Darshan
Logging not happening
Hello Darshan,
Thank you for your interest in SmartInspect. That the logging is not working for you can have several reasons. First, make sure that the SiAuto.Si.Enabled is set to true and that the SiAuto.Si.Connections is correctly setup to write the log packets to a log file:
SiAuto.Si.Connections = "file(filename=log.sil)";
SiAuto.Si.Enabled = true;
Secondly, if the logging is still not working then, try to register an event handler for the Error event:
/* C# */
SiAuto.Si.Error += new ErrorEventHandler(MyEventHandler);
' VB.NET
AddHandler SiAuto.Si.Error, AddressOf MyEventHandler
This needs to be done before enabling the SiAuto.Si object. Your MyEventHandler callback will be called by the Error event if an error occurs while trying to open the log file, for example. Your event handler will be passed an exception object which can be used to analyze the occurred error.