mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Add process ID to log filename #212
an attempt to mitigate a bug with rogold accidentally launching roblox twice when launching a game through one of its added features making bloxstrap error because both instances will have the same log filename don't want to just terminate any launched instances that encounter the same filename since there could be a case of someone intentionally launching roblox repeatedly this won't actually stop the double launching, there's not much way around that without being able to see the executing args of other bloxstrap instances, but it solves the error
This commit is contained in:
parent
af26604980
commit
c7a7feeebf
@ -80,8 +80,9 @@ namespace Bloxstrap
|
||||
bool isUsingTempDir = IsFirstRun || IsUninstall;
|
||||
string logdir = isUsingTempDir ? Path.Combine(Directories.LocalAppData, "Temp") : Path.Combine(Directories.Base, "Logs");
|
||||
string timestamp = DateTime.UtcNow.ToString("yyyyMMdd'T'HHmmss'Z'");
|
||||
int processId = Process.GetCurrentProcess().Id;
|
||||
|
||||
Logger.Initialize(Path.Combine(logdir, $"{ProjectName}_{timestamp}.log"));
|
||||
Logger.Initialize(Path.Combine(logdir, $"{ProjectName}_{timestamp}_{processId}.log"));
|
||||
|
||||
// clean up any logs older than a week
|
||||
if (!isUsingTempDir)
|
||||
|
Loading…
Reference in New Issue
Block a user