예제 #1
0
        private void FollowLog(JobLog log)
        {
            // Wait for PollingPeriod seconds
            Thread.Sleep(PollingPeriod.Value);

            // Grab new entries
            var entries = log.OrderedEntries().TakeWhile(l => l.Timestamp > _lastEntryUtc).Take(NumberOfEntries.Value);
            var logger = LogManager.GetLogger("joblog." + log.JobName);
            foreach (var entry in entries)
            {
                WriteEntry(logger, entry);
                _lastEntryUtc = entry.Timestamp;
            }
        }
예제 #2
0
 private void WriteEntry(JobLog log, JobLogEntry entry)
 {
     Log.Log(entry.FullEvent);
 }