def discover_by_name(input_directory, output_directory):
metric_list = []<EOL>log_files = os.listdir(input_directory)<EOL>for log_file in log_files:<EOL><INDENT>if log_file in CONSTANTS.SUPPORTED_FILENAME_MAPPING.keys():<EOL><INDENT>metric_list.append(initialize_metric(CONSTANTS.SUPPORTED_FILENAME_MAPPING[log_file], [log_file], None, [], output_directory, CONSTANTS.RESOURCE_PATH,<EOL>CONSTANTS.SUPPORTED_FILENAME_MAPPING[log_file], None, None, {}, None, None, {}))<EOL><DEDENT>else:<EOL><INDENT>logger.warning('<STR_LIT>', log_file)<EOL><DEDENT><DEDENT>return metric_list<EOL>
Auto discover metric types from the files that exist in input_directory and return a list of metrics
:param: input_directory: The location to scan for log files
:param: output_directory: The location for the report