robhagemans / monobit

Tools for working with monochrome bitmap fonts
MIT License
208 stars 11 forks source link

logging.basicConfig() #24

Closed ksherlock closed 1 year ago

ksherlock commented 1 year ago

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.

robhagemans commented 1 year ago

Thanks! I wasn't aware there was now a force parameter. That's useful!

robhagemans commented 1 year ago

Merged into develop manually