You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
2 years ago
..
config_files Update cli.py to support custom loggers (#1906) 2 years ago
ssl_config Fix RQScheduler when run with SSL connection (#1383) 4 years ago
Dockerfile Typing (#1698) 2 years ago
__init__.py Update linting configuration (#1915) 2 years ago
fixtures.py Update linting configuration (#1915) 2 years ago
test.json Allows enqueueing by the cli (#1466) 3 years ago
test_callbacks.py Update linting configuration (#1915) 2 years ago
test_cli.py Update cli.py to support custom loggers (#1906) 2 years ago
test_commands.py Update linting configuration (#1915) 2 years ago
test_connection.py [Hotfix] Fix SSL connection for scheduler (#1894) 2 years ago
test_decorator.py Update linting configuration (#1915) 2 years ago
test_dependencies.py Update linting configuration (#1915) 2 years ago
test_fixtures.py Update linting configuration (#1915) 2 years ago
test_helpers.py Update linting configuration (#1915) 2 years ago
test_job.py Update linting configuration (#1915) 2 years ago
test_queue.py Update linting configuration (#1915) 2 years ago
test_registry.py Update linting configuration (#1915) 2 years ago
test_results.py Update linting configuration (#1915) 2 years ago
test_retry.py Update linting configuration (#1915) 2 years ago
test_scheduler.py Scheduler should release and heartbeat only acquired locks (#1914) 2 years ago
test_sentry.py Update linting configuration (#1915) 2 years ago
test_serializers.py Update linting configuration (#1915) 2 years ago
test_timeouts.py Update linting configuration (#1915) 2 years ago
test_utils.py Update linting configuration (#1915) 2 years ago
test_worker.py Update linting configuration (#1915) 2 years ago
test_worker_pool.py Update linting configuration (#1915) 2 years ago
test_worker_registration.py Update linting configuration (#1915) 2 years ago