'get_task_log(task_id) -> (stdout_text, stderr_text, syslog_text)
Retrieve the task log from the TaskTracker, at this url:
http://<tracker_host>:<port>/tasklog?taskid=<attempt_id>
Optional query string:
&filter=<source>  : where <source> is \'syslog\', \'stdout\', or \'stderr\'.
&start=<offset>   : specify the start offset of the log section, when using a filter.
&end=<offset>     : specify the end offset of the log section, when using a filter.'

def get_task_log(self):

    tracker = self.get_tracker()
    url = urlunparse(('http', ('%s:%s' % (tracker.host, tracker.httpPort)), 'tasklog', None, ('attemptid=%s' % (self.attemptId,)), None))
    LOG.info(('Retrieving    %s' % (url,)))
    try:
        data = urllib2.urlopen(url)
    except urllib2.URLError:
        raise urllib2.URLError((_('Cannot    retrieve    logs    from    TaskTracker    %(id)s.') % {'id': self.taskTrackerId}))
    et = lxml.html.parse(data)
    log_sections = et.findall('body/pre')
    logs = [(section.text or '') for section in log_sections]
    if (len(logs) < 3):
        LOG.warn(('Error    parsing    task    attempt    log    for    %s    at    "%s".    Found    %d    (not    3)    log    sections' % (self.attemptId, url, len(log_sections))))
        err = (_("Hue    encountered    an    error    while    retrieving    logs    from    '%s'.") % (url,))
        logs += ([err] * (3 - len(logs)))
    return logs
