mirror of https://github.com/astral-sh/ruff
19 lines
508 B
Python
19 lines
508 B
Python
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
logging.exception("foo") # OK
|
|
logging.exception("foo", exc_info=False) # LOG007
|
|
logging.exception("foo", exc_info=[]) # LOG007
|
|
logger.exception("foo") # OK
|
|
logger.exception("foo", exc_info=False) # LOG007
|
|
logger.exception("foo", exc_info=[]) # LOG007
|
|
logger.error("foo", exc_info=False) # OK
|
|
logger.info("foo", exc_info=False) # OK
|
|
|
|
|
|
from logging import exception
|
|
|
|
exception("foo", exc_info=False) # LOG007
|
|
exception("foo", exc_info=True) # OK
|