Skip to content
This repository was archived by the owner on Nov 23, 2020. It is now read-only.
This repository was archived by the owner on Nov 23, 2020. It is now read-only.

Ability to disable automatic logger config #310

@mLewisLogic

Description

@mLewisLogic
  • pulsar version: 2.0.2
  • python version: 3.6.5
  • platform: MacOS/CentOS

Description

I'm attempting to use Pulsar to rewire a legacy synchronous system in the actor style. I have pre-existing logging configurations that I would prefer to use (multiple file handlers for different subpackages/modules).

I tried setting cfg.set('log_handlers', logging._handlerList), but that fails when it runs dictConfig in log.configuredLogger because I've already called dictConfig prior to setting up the Pulsar arbiter. ValueError: Unable to configure root logger: Unable to add handler <weakref at 0x10c892408; to 'FileHandler' at 0x10c89eac8>

Even that was a bit of a shot in the dark. I couldn't find a clear way to disable the logging autoconfig and control the config myself.

Expected behaviour

Ability to use Pulsar as a library which allows me to define my own logging config.

Actual behaviour

Pulsar configures logging itself, overriding logging config that I have setup.

Steps to reproduce

  1. Setup logging using dictConfig.
  2. Initialize an arbiter.
  3. Original logging config is overwritten when self.cfg.configured_logger is called in Concurrency.get_event_loop()

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