# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific

import logging
import argparse
import verboselogs
import coloredlogs

from houston.houston import Houston


# Get debug args
parser = argparse.ArgumentParser()
parser.add_argument(
    '-d', '--debug',
    help="Print lots of debugging statements",
    action="store_const", dest="loglevel", const='DEBUG',
    default='WARNING',
)
parser.add_argument(
    '-v', '--verbose',
    help="Be verbose",
    action="store_const", dest="loglevel", const='INFO',
)
args = parser.parse_args()    

# Install verbose logs
verboselogs.install()

# Create a logger object.
logger = logging.getLogger('Houston_Log')

# Install colored logs
coloredlogs.install(level=args.loglevel,
                    logger=logger,
                    fmt='%(asctime)s,%(msecs)03d %(hostname)s %(levelname)s %(message)s')  # noqa: E501

logger.info('Lewis Companion Software Started.')

if __name__ == '__main__':
    app = Houston(logger)
    app.run()
