Skip to content

Commit 264edcd

Browse files
committed
added log printing for when duplicates are fired or not
1 parent 81854b9 commit 264edcd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static void Main()
5959

6060
private static void DuplicateInstanceExit()
6161
{
62+
Log.Warning("Program | exiting, only one instance of the application can be running at once");
6263
ShowBalloon("Exiting....", "Only a single instance of the application can be running at a time.", ToolTipIcon.Warning, 2500);
6364
//creater a timer
6465
System.Threading.Timer timer = new System.Threading.Timer((o) => OnExit(o, new EventArgs()));
@@ -71,7 +72,7 @@ private static bool IsNewInstance()
7172
bool isNew = false;
7273

7374
Values.SingleInstanceMutex = new Mutex(true, Values.Namespace, out isNew);
74-
75+
Log.Information($"Program | this instance is {(isNew ? "new" : "a duplicate")}");
7576
return isNew;
7677
}
7778

0 commit comments

Comments
 (0)