pytest: can't see logging messages during pytest_sessionfinish

Hi,

the following plugin won’t show any logging message during pytest_sessionfinish.

import logging

logger = logging.getLogger("my.plugin")

def pytest_runtestloop(session):
    logger.info("this is showing")

def pytest_sessionfinish(session, exitstatus):
    logger.info("this is not showing")

Executed with the following configuration:

[pytest]
; logging options
log_cli = true
log_level = INFO
log_format = %(asctime)s %(name)s: %(levelname)s %(message)s

Thanks, Andrea

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you very much

Great! Thx for working on this @vbarbaresi