Current filter:
                                You should refresh the page.
                                Support Center
                                  • How can I implement a customized Tracer to not out assemblies to the log file?

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hello Scott,

                                The list of loaded assemblies has helped us many times track down customers' problems, especially when several versions of the same assembly were loaded. So, it is generally required, at least for diagnostic.

                                If you do not like it, consider the following solution instructions to remove it completely:
                                1. Create and register a custom Tracing class as per the "Custom Tracing" section of the Concepts > Debugging and Error Handling > Add Custom Log Entries and Customize the Default Tracer Behavior  article.

                                2. Override the LogLoadedAssemblies and LogError methods as shown below:

                                using DevExpress.Persistent.Base; //... public class TracingEx : Tracing { //Prevent logging loaded assemblies at the application startup. public override void LogLoadedAssemblies() { //base.LogLoadedAssemblies(); } //Prevent logging loaded assemblies that are logged when an exception is thrown. public override void LogError(Exception exception) { string report = FormatExceptionReport(exception); report = report.Replace(report.Substring(report.IndexOf(Tracing.SubSectionDelim)), Tracing.SectionDelim); LogError(report); } }

                                See Also:
                                How to replace XAF exception handling with Logify

                                • Scott Gross 04.28.2017
                                  So I tried following the instructions, but it is still logging the loaded assemblies.

                                  I have this to try to not log loaded assemblies
                                  public class TracingVipr : Tracing { public override void LogLoadedAssemblies() { //base.LogLoadedAssemblies(); } }

                                  putting the event handler in the platform agnostic module did not work, then I tried putting in on the WinApp Program.cs

                                  static void Main() { #if EASYTEST DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register(); #endif Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached; Tracing.CreateCustomTracer += (s, args) => args.Tracer = new Module.Util.TracingVipr(); Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath; Tracing.Initialize(); ViprWindowsFormsApplication winApplication = new ViprWindowsFormsApplication(); ...
                                  any ideas?
                                • This code should be sufficient to prevent logging loaded assemblies at the application startup. Probably, you mean assemblies that are logged when an exception is thrown. To remove them from the log file, override the LogError method. I have added an example to Dennis' answer. If this is not what you need, please provide a sample project demonstrating the issue.

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners