A community-maintained Python framework for creating mathematical animations.
Merge pull request #521 from charlie4fun/fix_453
Leo Torres043cc53a6c5d
diff --cc manim/config/config.pyindex f3c95bcc5,0e5fdfb15..bb55d47ab--- a/manim/config/config.py+++ b/manim/config/config.py@@@ -164,15 -151,24 +164,24 @@@ if _from_command_line()if not (hasattr(args, "subcommands")):_init_dirs(file_writer_config)config = _parse_config(config_parser, args)+if config["use_js_renderer"]:+ file_writer_config["disable_caching"] = Truecamera_config = config-# Set the different loggers-set_rich_logger(config_parser["logger"], file_writer_config["verbosity"])if file_writer_config["log_to_file"]:- # IMPORTANT note about file name : The log file name will be the scene_name get from the args (contained in file_writer_config). So it can differ from the real name of the scene.+ # Note about log_file_name : The log file name will be the <name_of_animation_file>_<name_of_scene>.log+ # get from the args (contained in file_writer_config). So it can differ from the real name of the scene.+ # <name_of_scene> would only appear if scene name was provided on manim call+ scene_name_suffix = "".join(file_writer_config["scene_names"])+ scene_file_name = os.path.basename(args.file).split(".")[0]+ log_file_name = (+ f"{scene_file_name}_{scene_name_suffix}.log"+ if scene_name_suffix+ else f"{scene_file_name}.log"+ )log_file_path = os.path.join(file_writer_config["log_dir"],- "".join(file_writer_config["scene_names"]) + ".log",+ log_file_name,)set_file_logger(log_file_path)- logger.info("Log file wil be saved in %(logpath)s", {"logpath": log_file_path})+ logger.info("Log file will be saved in %(logpath)s", {"logpath": log_file_path})