def _post_call(atdepth, package, fqdn, result, entry, bound, ekey, argl, argd):
    """Finishes constructing the log and records it to the database.
    """
    from time import time
    if not atdepth and entry is not None:
        ek = ekey
        if result is not None:
            retid = _tracker_str(result)
            if result is not None and not bound:
                ek = retid
                entry["r"] = None
            else:
                entry["r"] = retid
            
        name = fqdn.split('.')[-1]
        if filter_name(fqdn, package, "time"):
            entry["e"] = time() - entry["s"]
        if filter_name(fqdn, package, "analyze"):
            entry["z"] = analyze(fqdn, result, argl, argd)

        msg.info("{}: {}".format(ek, entry), 1)
        # Before we return the result, let's first save this call to the
        # database so we have a record of it.
        record(ek, entry)
        return (ek, entry)
    else:
        return (None, None)
Finishes constructing the log and records it to the database.