diff options
author | juur <juur@users.noreply.github.com> | 2023-05-18 01:04:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 07:04:57 +0700 |
commit | 107221fd9ef1db5eca0d55459a318ad65dd253f5 (patch) | |
tree | 7f77e992d3773a704aa0a06cff9f467f6659b790 /tests/test_worker_pool.py | |
parent | bdbc9a4f9ca79727316f7e41473981593773e34c (diff) | |
download | rq-master.tar.gz |
* Update cli.py to support custom loggers
Allows a config.py file (via rq worker --config) to support things like this for logfmt logging:
DICT_CONFIG = {
"version": 1,
"formatters": {"logfmt": {
"()": "logfmter.Logfmter",
"keys": ["level","when","pid"],
"mapping": {"level":"levelname","when":"asctime","pid":"process"},
"datefmt": "%Y-%m-%dT%H:%M:%S%z"
}},
"handlers": {"console": {"class": "logging.StreamHandler","formatter": "logfmt" }},
"loggers": {
"root": {"handlers":["console"], "level": "INFO"},
"rq": {"handlers":["console"], "level": "INFO", "propagate": False},
}
}
* added simple test and documentation for DICT_CONFIG
* further attempt to get testing right for dictConfig
* move import to correct location
* fix
* remove meaningless options.get() usage
* linting checks and added missing test config file
Diffstat (limited to 'tests/test_worker_pool.py')
0 files changed, 0 insertions, 0 deletions