mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
moved default event log to its own log
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.ServiceProcess;
|
||||
|
||||
@@ -45,8 +46,15 @@ namespace ArchiSteamFarm {
|
||||
// System account, requires admin privilege to install
|
||||
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
|
||||
|
||||
EventLogInstaller logInstaller = new EventLogInstaller
|
||||
{
|
||||
Log = SharedInfo.EventLog,
|
||||
Source = SharedInfo.EventLogSource
|
||||
};
|
||||
|
||||
Installers.Add(serviceInstaller);
|
||||
Installers.Add(serviceProcessInstaller);
|
||||
Installers.Add(logInstaller);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace ArchiSteamFarm {
|
||||
if (Program.IsRunningAsService) {
|
||||
EventLogTarget eventLogTarget = new EventLogTarget("EventLog") {
|
||||
Layout = EventLogLayout,
|
||||
Log = SharedInfo.EventLog,
|
||||
Source = SharedInfo.EventLogSource
|
||||
};
|
||||
|
||||
LogManager.Configuration.AddTarget(eventLogTarget);
|
||||
|
||||
@@ -30,5 +30,7 @@ namespace ArchiSteamFarm {
|
||||
internal const string GithubRepo = "JustArchi/ArchiSteamFarm";
|
||||
internal const string ServiceName = "ArchiSteamFarm";
|
||||
internal const string ServiceDescription = "ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.";
|
||||
internal const string EventLog = "ArchiSteamFarm";
|
||||
internal const string EventLogSource = "ArchiSteamFarmLogger";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user