def METHOD_NAME():
    """Main function of log parser"""
    args = parse_args()
    # Setup logging for parser
    logging.basicConfig(format=LOGGER_FORMAT)
    if args.debug:
        logger.setLevel(logging.DEBUG)
    else:
        logger.setLevel(logging.INFO)
    # Read from database file
    database = LogDatabase.read_json_database(args.dbfile)
    if database is None:
        logger.error("ERROR: Cannot open database file: %s, exiting...", args.dbfile)
        sys.exit(1)
    logdata = read_log_file(args)
    if logdata is None:
        logger.error("ERROR: cannot read log from file: %s, exiting...", args.logfile)
        sys.exit(1)
    log_parser = dictionary_parser.get_parser(database)
    if log_parser is not None:
        logger.debug("# Build ID: %s", database.get_build_id())
        logger.debug("# Target: %s, %d-bit", database.get_arch(), database.get_tgt_bits())
        if database.is_tgt_little_endian():
            logger.debug("# Endianness: Little")
        else:
            logger.debug("# Endianness: Big")
        ret = log_parser.parse_log_data(logdata, debug=args.debug)
        if not ret:
            logger.error("ERROR: there were error(s) parsing log data")
            sys.exit(1)
    else:
        logger.error("ERROR: Cannot find a suitable parser matching database version!")
        sys.exit(1)