rq/tests/config_files
juur 107221fd9e
Update cli.py to support custom loggers (#1906)
* 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
2023-05-18 07:04:57 +07:00
..
__init__.py RQ v1.0! (#1059) 2019-03-30 09:13:56 +07:00
dummy.py Drop python2-specific syntax (#1674) 2022-07-24 08:17:07 +07:00
dummy_logging.py Update cli.py to support custom loggers (#1906) 2023-05-18 07:04:57 +07:00
dummy_override.py Drop python2-specific syntax (#1674) 2022-07-24 08:17:07 +07:00
sentry.py Drop python2-specific syntax (#1674) 2022-07-24 08:17:07 +07:00