ポキ 2020-11-04 07:46:47 +05:00
parent 47c5f4755e
commit d008e6a6b2
2 changed files with 3 additions and 9 deletions

View File

@ -102,7 +102,7 @@ def build(path: str, flags: Dict[str, str] = {}, options: Dict[str, bool] = {},
if os.path.isfile(config_path) and not override: if os.path.isfile(config_path) and not override:
logging.warning(f"A config file exists at '{config_path}', keeping it") logging.warning(f"A config file exists at '{config_path}', keeping it")
else: else:
if os.path.isfile(config_path) and override: if os.path.isfile(config_path):
logging.warning(f"Overriding config file at '{config_path}'") logging.warning(f"Overriding config file at '{config_path}'")
logging.debug(f"Generating config file at '{config_path}'") logging.debug(f"Generating config file at '{config_path}'")
try: try:
@ -152,10 +152,7 @@ if __name__ == "__main__":
"array_grow_factor": "2", "array_grow_factor": "2",
"frames_max": "800" "frames_max": "800"
} }
if args.verbose: level = logging.DEBUG if args.verbose else logging.INFO
level = logging.DEBUG
else:
level = logging.INFO
logging.basicConfig(format="[%(levelname)s - %(asctime)s] %(message)s", logging.basicConfig(format="[%(levelname)s - %(asctime)s] %(message)s",
datefmt="%T", datefmt="%T",
level=level level=level

View File

@ -68,10 +68,7 @@ if __name__ == "__main__":
parser.add_argument("--flags", help="Optional flags to be passed to the nim compiler. Must be a comma-separated list of name:value (without spaces)") parser.add_argument("--flags", help="Optional flags to be passed to the nim compiler. Must be a comma-separated list of name:value (without spaces)")
args = parser.parse_args() args = parser.parse_args()
flags = {} flags = {}
if args.verbose: level = logging.DEBUG if args.verbose else logging.INFO
level = logging.DEBUG
else:
level = logging.INFO
logging.basicConfig(format="[%(levelname)s - %(asctime)s] %(message)s", logging.basicConfig(format="[%(levelname)s - %(asctime)s] %(message)s",
datefmt="%T", datefmt="%T",
level=level level=level