Skip to content

Commit

Permalink
Log launcher version on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
srwi committed Feb 26, 2023
1 parent f51ee0b commit 7394078
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EverythingToolbar.Deskband/CSDeskBand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,18 +1009,18 @@ public abstract class CSDeskBandWpf : ICSDeskBand, IDeskBandProvider
private readonly CSDeskBandImpl _impl;
private readonly AdornerDecorator _rootVisual;

private static readonly ILogger _logger = ToolbarLogger.GetLogger<CSDeskBandWpf>();
private static readonly ILogger Logger = ToolbarLogger.GetLogger<CSDeskBandWpf>();

/// <summary>
/// Initializes a new instance of the <see cref="CSDeskBandWpf"/> class.
/// </summary>
public CSDeskBandWpf()
{
ToolbarLogger.Initialize();
_logger.Info($"EverythingToolbar Deskband {Assembly.GetExecutingAssembly().GetName().Version} started. OS: {Environment.OSVersion}");
Logger.Info($"EverythingToolbar {Assembly.GetExecutingAssembly().GetName().Version} started. OS: {Environment.OSVersion}");
AppDomain.CurrentDomain.FirstChanceException += (sender, e) =>
{
_logger.Debug(e.Exception, "Unhandled first chance exception");
Logger.Debug(e.Exception, "Unhandled first chance exception");
};

Options.Title = RegistrationHelper.GetToolbarName(GetType());
Expand Down
4 changes: 4 additions & 0 deletions EverythingToolbar.Launcher/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
Expand All @@ -11,6 +12,7 @@
using EverythingToolbar.Properties;
using Microsoft.Xaml.Behaviors;
using NHotkey;
using NLog;
using Application = System.Windows.Application;
using MessageBox = System.Windows.MessageBox;
using Resources = EverythingToolbar.Launcher.Properties.Resources;
Expand All @@ -24,12 +26,14 @@ internal static class Launcher
private const string MutexName = "EverythingToolbar.Launcher";
private static bool _searchWindowRecentlyClosed;
private static Timer _searchWindowRecentlyClosedTimer;
private static readonly ILogger Logger = ToolbarLogger.GetLogger("Launcher");

private class LauncherWindow : Window
{
public LauncherWindow(NotifyIcon icon)
{
ToolbarLogger.Initialize();
Logger.Info($"EverythingToolbar Launcher {Assembly.GetExecutingAssembly().GetName().Version} started. OS: {Environment.OSVersion}");

_searchWindowRecentlyClosedTimer = new Timer(500);
_searchWindowRecentlyClosedTimer.AutoReset = false;
Expand Down

0 comments on commit 7394078

Please sign in to comment.