Skip to content

mylogger.py removes all existing logging handlers #233

@zack466

Description

@zack466

I noticed that in mylogger.py, when init_logger() is called, it removes all existing handlers from the root logger (source). However, this means that when pybdsf is called from a scripting context, it deletes all of the existing logging handlers set up by the calling code, completely eliminating all non-pybdsf logging logic. This is very unexpected and definitely should not happen. I think it would be helpful to assign constant names to the pybdsf-specific logging handlers and only remove those named handlers from the root logger in init_logger() rather than all of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions