aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-23 08:44:31 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-23 08:44:31 +0300
commit02ae577faa0bd4938507061d603e4f9447e2b64f (patch)
tree7daf0e275338ec92e93bfca39f2d529d93858162 /Software/Visual_Studio/Tango.Logging
parent67770063ff1a1c5c522e3bc29f442c42eb6dc521 (diff)
downloadTango-02ae577faa0bd4938507061d603e4f9447e2b64f.tar.gz
Tango-02ae577faa0bd4938507061d603e4f9447e2b64f.zip
Fixed issue with insights file datetime utc.
added insights application exception/crash. added remote actions service. fixed issue with LiteDB hang on application start/exit. reduced insights listener empty frames.
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging')
-rw-r--r--Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs b/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
index fc791ff4a..3409ffdc4 100644
--- a/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
+++ b/Software/Visual_Studio/Tango.Logging/GlobalExceptionTrapper.cs
@@ -21,6 +21,7 @@ namespace Tango.Logging
public class WpfGlobalExceptionTrapper : IGlobalExceptionTrapper
{
private DateTime _lastGlobalExceptionTime = DateTime.Now.AddMinutes(-1);
+ private Application _app;
/// <summary>
/// Occurs when the global exception trapper has detected an unhandled exception.
@@ -33,6 +34,7 @@ namespace Tango.Logging
/// <param name="app">The application.</param>
public void Initialize(Application app)
{
+ _app = app;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
app.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
@@ -40,6 +42,17 @@ namespace Tango.Logging
}
/// <summary>
+ /// Use only when need to simulate application crash!
+ /// </summary>
+ public void Disable()
+ {
+ AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException;
+ _app.Dispatcher.UnhandledException -= Dispatcher_UnhandledException;
+ Application.Current.DispatcherUnhandledException -= Current_DispatcherUnhandledException;
+ TaskScheduler.UnobservedTaskException -= TaskScheduler_UnobservedTaskException;
+ }
+
+ /// <summary>
/// Handles the UnobservedTaskException event of the TaskScheduler control.
/// </summary>
/// <param name="sender">The source of the event.</param>