Browse Source

name the variable better: rename LogFile => LogFilePath

tags/3.0
kimw 8 years ago
parent
commit
937171996a
2 changed files with 5 additions and 6 deletions
  1. +3
    -3
      shadowsocks-csharp/Controller/Logging.cs
  2. +2
    -3
      shadowsocks-csharp/View/MenuViewController.cs

+ 3
- 3
shadowsocks-csharp/Controller/Logging.cs View File

@@ -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);


+ 2
- 3
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -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;


Loading…
Cancel
Save