private ConsoleSM(ConsoleStore config) { Config = config; ProcessingQueueSize = 100_000; ProcessingQueue = new BlockingCollection <LogData>(ProcessingQueueSize); AccessAttemptsDelays_mSeconds = new int[] { 1, 3, 6, 10, 15, 25, 30, 40 }; Logger = LoggersFactory.GetLogger <ConsoleSM>(true); MinLogLevel = config.minLogLevel; }
private FileSM(FileStore config) { Config = config; Logger = LoggersFactory.GetLogger <FileSM>(true); ProcessingQueueSize = 1_000_000; ProcessingQueue = new BlockingCollection <LogData>(ProcessingQueueSize); AccessAttemptsDelays_mSeconds = new int[] { 1, 5, 25, 45, 90, 250, 500, 1000 }; MinLogLevel = config.minLogLevel; createdTimeOfLastFile = ImportCreatedTimeOfLastFile(); }
private MongoDbSM(MongoDBStore config) { client = new MongoClient(config.connectionString); var db = client.GetDatabase(config.dbName); logsCollection = db.GetCollection <LogDataModel>(config.collectionName); //Если она не существует, неявно создастся Config = config; ProcessingQueueSize = 1_000_000; ProcessingQueue = new BlockingCollection <LogData>(ProcessingQueueSize); AccessAttemptsDelays_mSeconds = new int[] { 25, 45, 90, 250, 500, 1000, 3000, 5000 }; Logger = LoggersFactory.GetLogger <MongoDbSM>(true); MinLogLevel = config.minLogLevel; }
private TelegramSM(TelegramStore config) { Config = config; ProcessingQueueSize = 100_000; ProcessingQueue = new BlockingCollection <LogData>(ProcessingQueueSize); AccessAttemptsDelays_mSeconds = new int[] { 25, 45, 90, 250, 500, 1000, 3000, 5000 }; Logger = LoggersFactory.GetLogger <TelegramSM>(true); MinLogLevel = config.minLogLevel; if (Config.intensivity.enable) { Intensivity = new TelegramHandlingIntensivity { PeriodLength = Config.intensivity.period } } ; }