import aps2.uLogging

import pprint
import json


def print_environment(parsed_environ):
    aps2.uLogging.trace('REQUEST ENVIRONMENT:')
    aps2.uLogging.trace(pprint.pformat(parsed_environ.environ))


def print_request_body(parsed_environ):
    print_json("REQUEST BODY:", parsed_environ.get("BODY"))


def print_list_services(list_services):
    aps2.uLogging.trace("LIST_SERVICES:")
    aps2.uLogging.trace(list_services)


def print_json(prefix, jsn):
    aps2.uLogging.trace(prefix + json.dumps(jsn, indent=8))


def print_line():
    aps2.uLogging.info("-----------------------------------")

