mirror of
https://github.com/ckaczor/WorkIndicator.git
synced 2026-02-11 10:38:37 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 896427ba75 |
@@ -4,6 +4,7 @@ using Common.Wpf.Extensions;
|
|||||||
using Serilog;
|
using Serilog;
|
||||||
using Squirrel;
|
using Squirrel;
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -26,9 +27,15 @@ namespace WorkIndicator
|
|||||||
{
|
{
|
||||||
SquirrelAwareApp.HandleEvents(onAppUpdate: version => Common.Settings.Extensions.RestoreSettings());
|
SquirrelAwareApp.HandleEvents(onAppUpdate: version => Common.Settings.Extensions.RestoreSettings());
|
||||||
|
|
||||||
|
var location = Assembly.GetEntryAssembly().Location;
|
||||||
|
|
||||||
|
var path = Path.GetDirectoryName(location);
|
||||||
|
|
||||||
|
var logFile = Path.Combine(path, "log.txt");
|
||||||
|
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.MinimumLevel.Debug()
|
.MinimumLevel.Debug()
|
||||||
.WriteTo.File("log.txt", rollingInterval: RollingInterval.Day)
|
.WriteTo.File(logFile, rollingInterval: RollingInterval.Day)
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
||||||
Log.Logger.Debug($"Startup");
|
Log.Logger.Debug($"Startup");
|
||||||
|
|||||||
Reference in New Issue
Block a user