mirror of
https://github.com/ckaczor/WorkIndicator.git
synced 2026-02-08 09:38:33 -05:00
Add some basic logging
This commit is contained in:
10
App.xaml.cs
10
App.xaml.cs
@@ -1,6 +1,7 @@
|
||||
using Common.Helpers;
|
||||
using Common.IO;
|
||||
using Common.Wpf.Extensions;
|
||||
using Serilog;
|
||||
using Squirrel;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
@@ -25,6 +26,13 @@ namespace WorkIndicator
|
||||
{
|
||||
SquirrelAwareApp.HandleEvents(onAppUpdate: version => Common.Settings.Extensions.RestoreSettings());
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Debug()
|
||||
.WriteTo.File("log.txt", rollingInterval: RollingInterval.Day)
|
||||
.CreateLogger();
|
||||
|
||||
Log.Logger.Debug($"Startup");
|
||||
|
||||
var application = new App();
|
||||
application.InitializeComponent();
|
||||
application.Run();
|
||||
@@ -90,6 +98,8 @@ namespace WorkIndicator
|
||||
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
{
|
||||
Log.Logger.Debug($"Exit");
|
||||
|
||||
// Get rid of the light controller
|
||||
LightController.Dispose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user