Skip to content

pymodbus.constants interferes with application's logging configuration #1119

@JonasNorling

Description

@JonasNorling

Versions

  • Python: 3.10
  • OS: Ubuntu Linux
  • Pymodbus: 3.0.0dev5
  • Modbus Hardware (if used):

Description

pymodbus.constants calls logging.basicConfig() on import, overriding any logging that the application attempts to configure later on. This is unexpected and a documented anti-pattern for Python logging.

There is more discussion in PR #1106, which I will close so that someone else can suggest a solution that the maintainers can agree with.

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