This project has moved and is read-only. For the latest updates, please go here.

Task history filter or sort

Topics: Setup
Feb 15, 2013 at 5:20 PM
Is there a way to filter a TaskEventLog, or to loop through it in descending date order? Some tasks have a huge number of history entries, so it takes a long time to go through them all. In most cases, we're only interested in entries from the last week or to.
Feb 15, 2013 at 9:19 PM
The TaskEventLog constructor allows you specify a start time, as task name and a machine name as filters.

For even fewer entries, you can also use the CorrelatedTaskEventLog which collects all events for a single trigger into a single record. It has a similar constructor. See the HomePanel.cs file in the TestTaskService project for an example of how to use it in a BackgroundWorkerThread.
Feb 19, 2013 at 3:57 PM
I don't see an option to include a start time, though that sound like exactly what I need. I see only two overloads, one to specify the TaskPath, and one to specify MachineName and TaskPath. Is the date option in a recent version?
Feb 19, 2013 at 11:54 PM
Yes. It was either 1.9.1 or 1.9.2.