import json
from typing import OrderedDict


def load_log(logpath):
    """
    Load and format stored JSON log to use integer keys in an
    OrderedDict.

    Note: You can view the returned log dictionary with info(<logdict>)
    """
    with open(logpath) as f:
        j=json.load(f)['_default']

    # convert keys to integers
    d = {}
    for istr, val in j.items():
        d[int(istr)] = val

    return OrderedDict(d)