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));
     }
 }
Example #2
0
 public EventLogger(Main game)
     : base(game)
 {
     Setting = LogSetting.Read(Path.Combine(TShock.SavePath, SettingFileName));
 }