-
Notifications
You must be signed in to change notification settings - Fork 158
Ability to disable automatic logger config #310
Description
- 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
- Setup logging using
dictConfig. - Initialize an arbiter.
- Original logging config is overwritten when
self.cfg.configured_loggeris called inConcurrency.get_event_loop()