예제 #1
0
 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);
     }
 }
예제 #2
0
        static SQLiteAppender()
        {
            var repository = SQLiteLoggerRepository.Get(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Log"));

            Logger = repository.Get(DateTimeCore.Today.ToYearMonth());
        }