Skip to content

Commit d4f6394

Browse files
authored
Merge pull request #139 from fosslight/temp
Add the pkg name to log and result file
2 parents 73731d1 + d39ebef commit d4f6394

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/fosslight_oss_pkg/_convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def convert_report(base_path, output_name, format, need_log_file=True):
2727

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

30-
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{now}.txt"),
30+
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_pre_{now}.txt"),
3131
need_log_file, logging.INFO, logging.DEBUG, _PKG_NAME, base_path)
3232
if success:
3333
if output_path == "":
@@ -40,7 +40,7 @@ def convert_report(base_path, output_name, format, need_log_file=True):
4040
if output_name != "":
4141
output_report = os.path.join(output_path, output_name)
4242
else:
43-
output_report = os.path.join(os.path.abspath(output_path), f"fosslight_report_{now}")
43+
output_report = os.path.join(os.path.abspath(output_path), f"fosslight_report_pre_{now}")
4444
else:
4545
logger.error(f"Format error - {msg}")
4646
sys.exit(1)

src/fosslight_prechecker/_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def add_content(target_path="", input_license="", input_copyright="", output_pat
353353
output_path = os.path.abspath(output_path)
354354

355355
now = datetime.now().strftime('%y%m%d_%H%M')
356-
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{now}.txt"),
356+
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_pre_{now}.txt"),
357357
need_log_file, logging.INFO, logging.DEBUG, PKG_NAME, path_to_find)
358358

359359
if not os.path.isdir(path_to_find):

src/fosslight_prechecker/_precheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def dump_error_msg(error_msg: str, exit=False):
271271

272272
def init(path_to_find, output_path, file_list, need_log_file=True):
273273
global logger, _result_log
274-
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{_start_time}.txt"),
274+
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_pre_{_start_time}.txt"),
275275
need_log_file, logging.INFO, logging.DEBUG, PKG_NAME, path_to_find)
276276
if file_list:
277277
_result_log["File list to check"] = file_list

0 commit comments

Comments
 (0)