private void OnTimedEvent(Object source, ElapsedEventArgs e) { this.ResetCounter(); string msg = string.Format("RESET Queued action counter: {0}. In Queue: {1}. MaxCounter: {2}.", _counter, TaskQueue.Count(), _maxDequeueCountPerMin); _logger.LogInformation(msg); Console.WriteLine(msg); }