Skip to content

can't see logging messages during pytest_sessionfinish #3340

@acerv

Description

@acerv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributorplugin: loggingrelated to the logging builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions