Search This Blog

Showing posts with label logging. Show all posts
Showing posts with label logging. Show all posts

Friday, May 11, 2018

Improved diagnostics for ListView errors in Server Mode

From the Core - ListView shows blank rows or freezes in certain scenarios in Server Mode ticket:


In certain scenarios, a list view with DataAccessMode set to Server may show empty rows or operate slowly. This behavior is usually caused by exceptions thrown during data loading that are handled internally. Such situations can be diagnosed using the debugger (see What to do when the grid displays blank rows in Server Mode and ASPxGridView displays empty rows when bound via Server Mode).

Starting with v18.1, we improved the XAF built-in diagnostics for errors occurring in Server Mode data sources. Now, server-side errors (intercepted via the ServerExceptionThrown event) are written to the application log. In addition, when the log level is set to 4 (Verbose), errors reported via the InconsistencyDetected event are also written to the log. While the latter event doesn't always indicate a problem, the error message may be helpful in researching the cause of performance issues.



Friday, July 21, 2017

Tracing - How to exclude loaded assemblies from the eXpressAppFramework.log file

Just a small tip for XAF developers who have never needed or liked this large "Loaded assemblies" section written into the eXpressAppFramework.log file at startup or every time an exception is thrown:



Friday, January 20, 2017

How to replace XAF exception handling with Logify

I would like to promote a KB article on the subject, which I published yesterday right after receiving a customer request in response to the recent DevExpress Logify: a New Exception Reporting Tool  blog post.

The XAF article describes three typical ways to integrate Logify into an XAF app. Here I want to note that while the third option with a custom trace listener may look a bit complicated now, it is possible that the Logify team will come up with a built-in trace listener in the future (at least I talked about this with the responsible team and they also said that they thought about such an option). This way you will be able to plug-in this listener in an XAF app using a few lines in the configuration file or in code as per How to: Create and Initialize Trace Listeners (MSDN).


We would greatly appreciate it if you inform us of which XAF integration approach (# 1,2,3 or any other) you eventually implemented in your project and how it all worked for you. Thanks in advance!

Thursday, July 14, 2016

Tracing - How to customize the eXpressAppFramework.log file generation and other aspects of the default tracer behavior

In this short post I wanted to highlight a functionality and APIs I think any application framework must provide out-of-the-box as it is vital for effective debugging and troubleshooting during development and further application maintenance - logging errors and other diagnostic information.

Even though for the majority of our framework users it is sufficient to deal with this logging system using the high-level interface without digging much into its implementation details (e.g., by looking into the auto-generated eXpressAppFramework.log file or checking emails with error details whose sending can be automated with our framework by application administrators), sometimes it is helpful to see what is "under the hood" to consider new capabilities or improvements for your business. 

That said, let me quote my recent update to the old https://www.devexpress.com/kb=Q304721 article (yes, we constandly update our support knowledge base and especially popular public threads with the latest info and solutions) and, hopefully, you will find this information helpful for the future:

Our tracing mechanism relies on the standard .NET Framework logging APIs from the System.Diagnostics and related namespaces. By default, we use the TextWriterTraceListener class that writes all application events into the eXpressAppFramework.log file by means of our helperDevExpress.Persistent.Base.Tracing class. The latter is technically a wrapper above the standard trace listeners . You can learn more on this from eXpressApp Framework > Concepts > Debugging and Error Handling > Log Files.