public SQLiteLogger Get(int yearMonth) { lock (_dictionary) { if (_dictionary.ContainsKey(yearMonth)) { return(_dictionary[yearMonth]); } var log = new SQLiteLogger(_dir, yearMonth); _dictionary.Add(yearMonth, log); return(log); } }
static SQLiteAppender() { var repository = SQLiteLoggerRepository.Get(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Log")); Logger = repository.Get(DateTimeCore.Today.ToYearMonth()); }