Write the ErrorLog into the exe's directory.
This commit is contained in:
parent
d461f3553c
commit
740e16319c
1 changed files with 3 additions and 2 deletions
|
|
@ -12,11 +12,12 @@ namespace MatterHackers.MatterControl.Testing
|
||||||
string errorLogFileName = null;
|
string errorLogFileName = null;
|
||||||
public TestingDispatch()
|
public TestingDispatch()
|
||||||
{
|
{
|
||||||
errorLogFileName = "ErrorLog.txt";
|
string exePath = Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location );
|
||||||
|
errorLogFileName = Path.Combine(exePath, "ErrorLog.txt");
|
||||||
string firstLine = string.Format("MatterControl Errors: {0:yyyy-MM-dd hh:mm:ss tt}", DateTime.Now);
|
string firstLine = string.Format("MatterControl Errors: {0:yyyy-MM-dd hh:mm:ss tt}", DateTime.Now);
|
||||||
using (StreamWriter file = new StreamWriter(errorLogFileName))
|
using (StreamWriter file = new StreamWriter(errorLogFileName))
|
||||||
{
|
{
|
||||||
file.WriteLine(errorLogFileName, firstLine);
|
file.WriteLine(firstLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue