internal LogSourcesManager( IHeartBeatTimer heartbeat, MRU.IRecentlyUsedEntities recentlyUsedEntities, IShutdown shutdown, ITraceSourceFactory traceSourceFactory, IChangeNotification changeNotification, ILogSourceFactory logSourceFactory ) { this.tracer = traceSourceFactory.CreateTraceSource("LogSourcesManager", "lsm"); this.logSourceFactory = logSourceFactory; this.recentlyUsedEntities = recentlyUsedEntities; this.changeNotification = changeNotification; this.visibleItems = Selectors.Create( () => logSources, () => visibilityRevision, (items, _) => ImmutableArray.CreateRange(items.Where(i => i.Visible)) ); heartbeat.OnTimer += (s, e) => { if (e.IsRareUpdate) { PeriodicUpdate(); } }; shutdown.Cleanup += (sender, e) => { shutdown.AddCleanupTask(this.DeleteAllLogs()); }; }
public FolderDataSource(ITaskScheduler taskScheduler, ILogSourceFactory logSourceFactory, IFilesystem filesystem, DataSource settings) : this(taskScheduler, logSourceFactory, filesystem, settings, TimeSpan.FromMilliseconds(value : 10)) { }
public void OneTimeSetUp() { _scheduler = new ManualTaskScheduler(); _logSourceFactory = new SimplePluginLogSourceFactory(_scheduler); _actionCenter = new Mock <IActionCenter>(); _applicationSettings = new Mock <IApplicationSettings>(); }
public void TestFixtureSetUp() { _taskScheduler = new DefaultTaskScheduler(); _logSourceFactory = new SimplePluginLogSourceFactory(_taskScheduler); _actionCenter = new Mock <IActionCenter>(); _settings = new ApplicationSettings(PathEx.GetTempFileName()); }
public FileDataSource(ILogSourceFactory logSourceFactory, ITaskScheduler taskScheduler, DataSource settings, TimeSpan maximumWaitTime) : base(taskScheduler, settings, maximumWaitTime) { if (logSourceFactory == null) { throw new ArgumentNullException(nameof(logSourceFactory)); } _originalLogSource = logSourceFactory.Open(settings.File); _unfilteredLogSource = new LogSourceProxy(TaskScheduler, MaximumWaitTime); OnSingleLineChanged(); OnUnfilteredLogFileChanged(); }
internal LogSourcesManager( IHeartBeatTimer heartbeat, ILogSourceFactory logSourceFactory ) { this.tracer = new LJTraceSource("LogSourcesManager", "lsm"); this.logSourceFactory = logSourceFactory; heartbeat.OnTimer += (s, e) => { if (e.IsRareUpdate) { PeriodicUpdate(); } }; }
public FolderDataSource(ITaskScheduler taskScheduler, ILogSourceFactory logSourceFactory, IFilesystem filesystem, DataSource settings, TimeSpan maximumWaitTime) { _taskScheduler = taskScheduler; _logSourceFactory = logSourceFactory; _filesystem = filesystem; _settings = settings; _syncRoot = new object(); _dataSources = new Dictionary <IFileInfo, FileDataSource>(); _mergedDataSource = new MergedDataSource(taskScheduler, settings, maximumWaitTime); _unfilteredLogSourceProxy = new LogSourceProxy(taskScheduler, maximumWaitTime); _filteredLogSourceProxy = new LogSourceProxy(taskScheduler, maximumWaitTime); DoChange(); }
public static void SetLogSourceFactory(ILogSourceFactory factory) { Instance.logSourceFactory = factory; }
private JobLogger() { logConfiguration = Locator.Resolve <ILogConfiguration>() ?? new DefaultLogConfiguration(); logSourceFactory = Locator.Resolve <ILogSourceFactory>() ?? new LogSourceFactory(); }
public FileDataSource(ILogSourceFactory logSourceFactory, ITaskScheduler taskScheduler, DataSource settings) : this(logSourceFactory, taskScheduler, settings, TimeSpan.FromMilliseconds(value : 10)) { }