'Basic log call.  At a minimum, this will write the tool name and version specified during init,
an event_type (heartbeat if not specified), a parent event (only if specified), and an event_time
(now if not specified).'

def __call__(self, event_type='heartbeat', parent_uuid=None, event_time=None, **params):

    try:
        d = self._flatten(event_time=(event_time if event_time else datetime.utcnow()), event_type=event_type, event_uuid=uuid(), event_parent_uuid=parent_uuid, **params)
        if d.get('start_time'):
            d['stop_time'] = d['event_time']
            d['event_time'] = d['start_time']
        if self.enabled:
            try:
                filename = (self.basefilename() + '.json')
                with open(filename, 'a') as f:
                    f.write((self._dumps(d) + '\n'))
            except:
                self.notify_of_error(('Failed    to    generate    output    file.        Parameters    were:\n' + str(params)))
                try:
                    os.remove(filename)
                except:
                    pass
        return d['event_uuid']
    except:
        self.notify_of_error(('Key    error.        Parameters    were:\n' + str(params)))
