///////////////////////////////////////////////// private void StartWorker() { if (!Directory.Exists(log_dir)) { GLib.Timeout.Add(60000, new GLib.TimeoutHandler(CheckForExistence)); return; } Logger.Log.Info("Starting Kopete log backend"); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); if (Inotify.Enabled) { Watch(log_dir); } crawler = new KopeteCrawler(log_dir); Crawl(); if (!Inotify.Enabled) { Scheduler.Task task = Scheduler.TaskFromHook(new Scheduler.TaskHook(CrawlHook)); task.Tag = "Crawling ~/.kopete/logs to find new logfiles"; task.Source = this; ThisScheduler.Add(task); } stopwatch.Stop(); Logger.Log.Info("Kopete log backend worker thread done in {0}", stopwatch); }
///////////////////////////////////////////////// private void StartWorker() { if (! Directory.Exists (log_dir)) { GLib.Timeout.Add (60000, new GLib.TimeoutHandler (CheckForExistence)); return; } Logger.Log.Info ("Starting Kopete log backend"); Stopwatch stopwatch = new Stopwatch (); stopwatch.Start (); if (Inotify.Enabled) Watch (log_dir); crawler = new KopeteCrawler (log_dir); Crawl (); if (!Inotify.Enabled) { Scheduler.Task task = Scheduler.TaskFromHook (new Scheduler.TaskHook (CrawlHook)); task.Tag = "Crawling ~/.kopete/logs to find new logfiles"; task.Source = this; ThisScheduler.Add (task); } stopwatch.Stop (); Logger.Log.Info ("Kopete log backend worker thread done in {0}", stopwatch); }