Skip to content

Commit

Permalink
Merge pull request #139 from fosslight/temp
Browse files Browse the repository at this point in the history
Add the pkg name to log and result file
  • Loading branch information
bjk7119 authored Feb 17, 2023
2 parents 73731d1 + d39ebef commit d4f6394
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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/_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def add_content(target_path="", input_license="", input_copyright="", output_pat
output_path = os.path.abspath(output_path)

now = datetime.now().strftime('%y%m%d_%H%M')
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, path_to_find)

if not os.path.isdir(path_to_find):
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 d4f6394

Please sign in to comment.