Skip to content

Python logging

Code

import logging

logger = logging.getLogger(__name__)
logger.info("My message")

logging.warning vs warnings.warn

  • logging.warning
    • issue with input/user
    • nothing the client app can do
  • warnings.warn
    • dev issue
      • examples
        • deprecated code
        • abstract class not implement

Last update: 2022-09-23