Code cleanup.

This commit is contained in:
2022-10-02 16:25:45 +08:00
parent 6fb7b97bd8
commit 5fb135bfa5
16 changed files with 26 additions and 29 deletions

View File

@@ -21,8 +21,9 @@ namespace Cryville.Common {
public static void Create(string key, Logger logger) {
Instances[key] = logger;
if (logPath != null) {
Files[key] = new StreamWriter(logPath + "/" + ((int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString() + "-" + key + ".log");
Files[key].AutoFlush = true;
Files[key] = new StreamWriter(logPath + "/" + ((int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString() + "-" + key + ".log") {
AutoFlush = true
};
}
}
public static void Close() {