예제 #1
0
 public static LogSetting Read(string path)
 {
     if (!File.Exists(path))
     {
         Console.WriteLine("LogSetting: Using default configs.");
         LogSetting setting = new LogSetting();
         setting.Write(path);
         return(setting);
     }
     using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
     {
         return(Read(fs));
     }
 }
예제 #2
0
 public EventLogger(Main game)
     : base(game)
 {
     Setting = LogSetting.Read(Path.Combine(TShock.SavePath, SettingFileName));
 }