Stop logging error logs on to Error log file under Logs fold

Posted by sandeep.reddypalle@fcsamerica.com on 25-Feb-2020 22:35

We have a service that we call to log any errors, wondering how can I stop logging errors on to Error log file under App_Data/Sitefinity/Logs/Error.log ?

All Replies

Posted by markmazelin on 26-Feb-2020 14:10

When you implement a custom trace listener using the following directions, the errors are no longer written to the local files.

www.progress.com/.../tutorial-create-and-enable-a-custom-trace-listener

In your custom configurator class instantiation in the Installer class (RaygunConfigurator in the sample code), you can send in an array of the log types (ConfigurationPolicy enums) that you want to handle. For instance, I'm handling just the Trace and ErrorLog ones. In the trace listener class, you will implement a LogMessage() method that can can your custom service.

Posted by sandeep.reddypalle@fcsamerica.com on 26-Feb-2020 22:28

Thanks for info [mention:fc39865ecf354feda324631f3f5f6fae:e9ed411860ed4f2ba0265705b8793d05] , I got it working now.

This thread is closed