Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

json serialization enhancement #5

@tponthieux

Description

@tponthieux

Having the items in the json output show up in the same order as the variables in the format string improves readability.

Instead of :
log_record = {}
use:
log_record = OrderedDict()

If you're worried about compatibility with older versions of python you could wrap it in a try or something.

try:
from collections import OrderedDict
except Exception:
pass

try:
log_record = OrderedDict()
except Exception:
log_record = {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions