Skip to content

Commit 7455a35

Browse files
committed
added system name to log path
1 parent c03f315 commit 7455a35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nodescraper/cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,12 @@ def main(arg_input: Optional[list[str]] = None):
548548
top_level_args, plugin_arg_map = process_args(arg_input, list(plugin_subparser_map.keys()))
549549

550550
parsed_args = parser.parse_args(top_level_args)
551+
system_info = get_system_info(parsed_args)
551552

552553
if parsed_args.log_path and parsed_args.subcmd not in ["gen-plugin-config", "describe"]:
553554
log_path = os.path.join(
554555
parsed_args.log_path,
555-
f"scraper_logs_{datetime.datetime.now().strftime('%Y_%m_%d-%I_%M_%S_%p')}",
556+
f"scraper_logs_{system_info.name}_{datetime.datetime.now().strftime('%Y_%m_%d-%I_%M_%S_%p')}",
556557
)
557558
os.makedirs(log_path)
558559
else:
@@ -591,7 +592,6 @@ def main(arg_input: Optional[list[str]] = None):
591592
plugin_subparser_map=plugin_subparser_map,
592593
)
593594

594-
system_info = get_system_info(parsed_args)
595595
log_system_info(log_path, system_info, logger)
596596
except Exception as e:
597597
parser.error(str(e))

0 commit comments

Comments
 (0)