Skip to content

import concore nukes root logger config (force=True in basicConfig) #410

@avinxshKD

Description

@avinxshKD

concore.py runs logging.basicConfig(..., force=True) at import time. force=True rips out all existing root logger handlers before setting itz own

So if your app sets up logging before importing concore, it gets silently destroyed. This is a library, it shouldn't be touching the root logger at all.

so fix can be, use a named logger with a NullHandler and let the application configure root logging itself

# instead of this
logging.basicConfig(..., force=True)

# this
logging.getLogger('concore').addHandler(logging.NullHandler())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions