Spaces:
Running
on
Zero
Running
on
Zero
File size: 367 Bytes
6eb1d7d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# Copyright (c) Facebook, Inc. and its affiliates.
# pyre-unsafe
import logging
def verbosity_to_level(verbosity) -> int:
if verbosity is not None:
if verbosity == 0:
return logging.WARNING
elif verbosity == 1:
return logging.INFO
elif verbosity >= 2:
return logging.DEBUG
return logging.WARNING
|