File size: 352 Bytes
938e515 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# Copyright (c) Facebook, Inc. and its affiliates.
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
|