Skip to content

Commit

Permalink
Add the pkg name to log and result file
Browse files Browse the repository at this point in the history
  • Loading branch information
bjk7119 committed Feb 17, 2023
1 parent b9f6962 commit 354568c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/fosslight_oss_pkg/_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def convert_report(base_path, output_name, format, need_log_file=True):

success, msg, output_path, output_name, output_extension = check_output_format(output_name, format, CUSTOMIZED_FORMAT_FOR_PRECHECKER)

logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{now}.txt"),
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_pre_{now}.txt"),
need_log_file, logging.INFO, logging.DEBUG, _PKG_NAME, base_path)
if success:
if output_path == "":
Expand All @@ -40,7 +40,7 @@ def convert_report(base_path, output_name, format, need_log_file=True):
if output_name != "":
output_report = os.path.join(output_path, output_name)
else:
output_report = os.path.join(os.path.abspath(output_path), f"fosslight_report_{now}")
output_report = os.path.join(os.path.abspath(output_path), f"fosslight_report_pre_{now}")
else:
logger.error(f"Format error - {msg}")
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion src/fosslight_prechecker/_precheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def dump_error_msg(error_msg: str, exit=False):

def init(path_to_find, output_path, file_list, need_log_file=True):
global logger, _result_log
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{_start_time}.txt"),
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_pre_{_start_time}.txt"),
need_log_file, logging.INFO, logging.DEBUG, PKG_NAME, path_to_find)
if file_list:
_result_log["File list to check"] = file_list
Expand Down

0 comments on commit 354568c

Please sign in to comment.