Hi Guys,
currently the Tracer writes to an Textfile - in an MultiUser Environment this is not useable. Imagine you have 50+ Users - the only way the Administrator has is to look on the local machines logfile. I need a way to write the LogMessages into the Database - any Suggestions here? Recompiling XAF Sources is no way!
thx
Noxe
We have closed this ticket because another page addresses its subject:
Tracing - How to customize the eXpressAppFramework.log file generation and other aspects of the default tracer behaviorTracing - Write Log Messages to Database
Answers approved by DevExpress Support
Hello Noxe,
Thanks for the question.
.NET Framework already allows you to do this. Just implement your own trace listener class that will write data into the database. As far as I know, there is no standard trace listener class that can do this. There are only simple text, xml and console trace listeners.
So, I suggest you continue from here: http://www.google.com/search?q=trace+listener&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1
The fact is that in XAF (the Tracing class) we use standard mechanisms provided by .NET Framework, and your own listener can be plugged in as in a regular .NET application.
Let me know if we can help you further with DX stuff.
Thanks,
Dennis
Hi I have implemented my own trace listener with log4net as suggested and it works fine.
However the devexpress log file "eXpressAppFramework.log" is still created.
If I configure the switch
<add name="eXpressAppFramework" value="0"/>
to zero the file is not created, but there are also no traces logged to the trace listener obviously.
So how can one use a custom trace listener and prevent the defult log file from creating?
@Patrick: We'll answer you in the separate ticket: XAF Logging with log4net. Thanks for creating it.