it comes out that when size of the fize eXpressAppFramework.log reaches some (strange) big values , all the project hangs
i need to stop webserver , delete eXpressAppFramework.log and then it works ok
is there a way to make data , being written to one eXpressAppFramework.log , be stored in separate files ?
for example every day there cound be created eXpressAppFramework-yyyy-mm-dd.log file
how can i make it work this way ?
Tracing - How to customize the eXpressAppFramework.log file generation and other aspects of the default tracer behavior
Answers
Hello,
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 helper DevExpress.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.
That said, there are two general directions on how to implement logging customizations like splitting a single log into separate files or writing the trace output into the database (I am afraid we do not currently provide ready examples or guidelines for these general programming tasks):
1. Implement a fully custom TraceListener class descendant (or use any ready listener like CircularTraceListener, RollingXmlWriterTraceListener or more complex third-party solutions like log4net (check XAF integration example code in Q234241)) and plug-it into your .NET app as described in the corresponding MSDN documentation. See how to replace the built-in Trace Listener in the Redirect Trace ticket. This approach is more preferred and can be easier to implement.
OR
2. Implement a fully custom Tracing class descendant and override its LogError, LogWarning, LogText, LogVerboseText, LogSetOfStrings, LogValue and other methods as you require. Refer to the eXpressApp Framework > Concepts > Debugging and Error Handling > Add Custom Log Entries and Customize the Default Tracer Behavior article for more details.
For certain tasks, it may also be sufficient to handle the NeedContextInformation and CustomFormatDateTimeStamp events without inheritance.
See Also:
How to replace XAF exception handling with Logify
Thanks,
Dennis