Logging exception what to use?

Jan 13, 2012 at 12:31 PM


in my n-tier WPF 1-click application deployment hosted in IIS I wish to add logging when an error occurs for example here


  _repository.LoadNotes( Date, _ancheEstinti,
                                        results =>
                                            DataItems = new BindableCollection<NoteResult>(results.Cast<NoteResult>());
                                            IsBusy = false;
                                         e =>
                                             log.Error(e); <--HERE
                                             IsBusy = false;

What should I use for logging? I wish to log the wpf exception on the server (since the client won't be installed in a folder), as fare I've seen the DebugLog.xml generated by ideablade does something similar what I point to... can I log to ExceptionLog.xml and save my needs? how?


Jan 13, 2012 at 2:06 PM

DevForce provides two classes, DebugFns and TraceFns to write to the DF log. By default, all log messages are written to the DebugLog.xml at the respective tier. That means log messages on the client are written to the DebugLog.xml on the client in WPF. You can fully replace this behavior by implementing your own custom logger. In that custom logger you could for example create an EntityManager and create your log messages as an entities and save them to the database or make a server-method call to have the server write the message to the server DebugLog.xml. For how to implement a custom logger see here:


Jan 13, 2012 at 2:33 PM

Thanks marcelgood,

was exacly what I was looking for! Thanks