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

Ability to disable automatic logger config #310

Open
mLewisLogic opened this issue Apr 29, 2018 · 0 comments
Open

Ability to disable automatic logger config #310

mLewisLogic opened this issue Apr 29, 2018 · 0 comments

Comments

@mLewisLogic
Copy link

  • 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()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant