As a temporary solution, it is possible to use the DevExpress.Persistent.Base.Tracing.NeedContextInformation event. Refer to the How to add information about the current user in the log information example for more information.
See Also:
Tracing - Write Log Messages to Database
Thanks,
Dennis
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Please maybe I do not understand something - how can I distinguish between Error/Warning/etc. using NeedContextInformation event?
It would be great if egz. NeedContextInformationEventArgs would ha d Category (with setter) and VerbositySwitch (read only) property and I could set Category in NeedContextInformation to my custom category. This Category should be then passed to Trace.WriteLine() in your Tracing.WriteLineIf(…) method.
I am sorry I know a little about Tracing and my proposal may be rather nonconceptual but please think of it or provide another solution.
My goal is to log some tracing messages into a database but with different, independent (typically lower) VerbositySwitch level than into a text log.
Thank you for your advice!
Michal
Hello Michal,
This feature request is still open, and the solution suggested above is rather temporary, and thus may not apply to each and every scenario.
We appreciate your suggestions on improving the Tracing class and will take this information into account.
Hi Dennis,
Anything new on that request? I would also like to categorize the various log events by verbosity switch.
Another related request… Ideally of we could turn off the date/time stamp at the begining of each entry since it's rather reduntant when saving in a logging system.
Thanks!
Alex
Hello Alex.
Thank you for your feedback and suggestions. This feature request is not implemented yet. You will be informed when anything changes.