_backup
This commit is contained in:
@@ -216,11 +216,26 @@ namespace Game
|
||||
|
||||
internal ConsoleInstance()
|
||||
{
|
||||
// Try different filename when running multiple instances
|
||||
string logFilename = "console.log";
|
||||
const int attempts = 16;
|
||||
for (int i = 0; i < attempts;)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if FLAX_EDITOR
|
||||
logStream = new StreamWriter(@"C:\dev\GoakeFlax\console.log", false);
|
||||
logStream = new StreamWriter(Path.Combine(@"C:\dev\GoakeFlax", logFilename), false);
|
||||
#else
|
||||
logStream = new StreamWriter(Path.Combine(Directory.GetCurrentDirectory(), "console.log"), false);
|
||||
logStream = new StreamWriter(Path.Combine(Directory.GetCurrentDirectory(), logFilename), false);
|
||||
#endif
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logFilename = $"console-{++i}.log";
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOpen { get; internal set; } = true;
|
||||
|
||||
Reference in New Issue
Block a user