MCPcopy Create free account
hub / github.com/smacke/ffsubsync / _setup_logging

Function _setup_logging

ffsubsync/ffsubsync.py:603–615  ·  view source on GitHub ↗
(
    args: argparse.Namespace,
)

Source from the content-addressed store, hash-verified

601
602
603def _setup_logging(
604 args: argparse.Namespace,
605) -> Tuple[Optional[str], Optional[logging.FileHandler]]:
606 log_handler = None
607 log_path = None
608 if args.make_test_case or args.log_dir_path is not None:
609 log_path = "ffsubsync.log"
610 if args.log_dir_path is not None and os.path.isdir(args.log_dir_path):
611 log_path = os.path.join(args.log_dir_path, log_path)
612 log_handler = logging.FileHandler(log_path)
613 logger.addHandler(log_handler)
614 logger.info("this log will be written to %s", os.path.abspath(log_path))
615 return log_path, log_handler
616
617
618def _npy_savename(args: argparse.Namespace) -> str:

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected