from datetime import datetime
from getpass import getuser
from socket import getfqdn
from platform import platform, python_implementation
from sys import version



def startup_info():
    """
    Log Startup Info.

    :return:
    """

    execution_date = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')
    print('-' * len(execution_date))
    print(execution_date)

    try:
        user = getuser()
    except Exception as exc:
        user = exc
    print(f'User: {user}')

    try:
        host = getfqdn()
    except Exception as exc:
        host = exc
    print(f'Host: {host}')

    try:
        os_platform = platform(aliased=True)
    except Exception as exc:
        os_platform = exc
    print(f'OS Platform: {os_platform}')

    try:
        py_version = version
    except Exception as exc:
        py_version = exc
    print(f'Python Version: {py_version}')

    try:
        py_implementation = python_implementation()
    except Exception as exc:
        py_implementation = exc
    py_implementation_ = f'Implementation: {py_implementation}'
    print(py_implementation_)
    print('-' * len(py_implementation_))

    pass
