logging.basicConfig() is ignored (unless force=True) if the logger is already configured. logging.error(), logging.info(), etc, will auto-configure the logger, if it hasn't been configured.
So something like:
try:
from uniseg.graphemecluster import grapheme_clusters
except ImportError:
logging.warning(
'Module `uniseg` not found. Grapheme clusters may not render correctly.'
)
will auto-configure the logger and later attempts to configure it will be unsuccessful.
logging.basicConfig()
is ignored (unlessforce=True
) if the logger is already configured.logging.error()
,logging.info()
, etc, will auto-configure the logger, if it hasn't been configured.So something like:
will auto-configure the logger and later attempts to configure it will be unsuccessful.