name the variable better: rename LogFile => LogFilePath
This commit is contained in:
@@ -9,14 +9,14 @@ namespace Shadowsocks.Controller
|
||||
{
|
||||
public class Logging
|
||||
{
|
||||
public static string LogFile;
|
||||
public static string LogFilePath;
|
||||
|
||||
public static bool OpenLogFile()
|
||||
{
|
||||
try
|
||||
{
|
||||
LogFile = Utils.GetTempPath("shadowsocks.log");
|
||||
FileStream fs = new FileStream(LogFile, FileMode.Append);
|
||||
LogFilePath = Utils.GetTempPath("shadowsocks.log");
|
||||
FileStream fs = new FileStream(LogFilePath, FileMode.Append);
|
||||
StreamWriterWithTimestamp sw = new StreamWriterWithTimestamp(fs);
|
||||
sw.AutoFlush = true;
|
||||
Console.SetOut(sw);
|
||||
|
||||
@@ -341,7 +341,6 @@ namespace Shadowsocks.View
|
||||
{
|
||||
item.Checked = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +362,7 @@ namespace Shadowsocks.View
|
||||
{
|
||||
if (logForms.Count == 0)
|
||||
{
|
||||
LogForm f = new LogForm(controller, Logging.LogFile);
|
||||
LogForm f = new LogForm(controller, Logging.LogFilePath);
|
||||
f.Show();
|
||||
f.FormClosed += logForm_FormClosed;
|
||||
|
||||
@@ -491,7 +490,7 @@ namespace Shadowsocks.View
|
||||
|
||||
private void ShowLogItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
LogForm f = new LogForm(controller, Logging.LogFile);
|
||||
LogForm f = new LogForm(controller, Logging.LogFilePath);
|
||||
f.Show();
|
||||
f.FormClosed += logForm_FormClosed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user