mirror of https://github.com/peter4431/rq.git
Merge branch 'selwin-remove-logbook'
Conflicts: rq/utils.py rq/worker.py setup.cfg setup.pymain
commit
d1c2b3b78d
@ -1,4 +1,3 @@
|
||||
redis
|
||||
times
|
||||
logbook
|
||||
argparse
|
||||
|
@ -0,0 +1,31 @@
|
||||
import logging.config
|
||||
|
||||
|
||||
def setup_loghandlers(verbose=False):
|
||||
if not logging._handlers:
|
||||
logging.config.dictConfig({
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
|
||||
"formatters": {
|
||||
"console": {
|
||||
"format": "%(asctime)s %(message)s",
|
||||
"datefmt": "%H:%M:%S",
|
||||
},
|
||||
},
|
||||
|
||||
"handlers": {
|
||||
"console": {
|
||||
"level": "DEBUG",
|
||||
#"class": "logging.StreamHandler",
|
||||
"class": "rq.utils.ColorizingStreamHandler",
|
||||
"formatter": "console",
|
||||
"exclude": ["%(asctime)s"],
|
||||
},
|
||||
},
|
||||
|
||||
"root": {
|
||||
"handlers": ["console"],
|
||||
"level": "DEBUG" if verbose else "INFO"
|
||||
}
|
||||
})
|
@ -1,2 +1,2 @@
|
||||
[bdist_rpm]
|
||||
requires = redis logbook
|
||||
requires = redis
|
||||
|
Loading…
Reference in New Issue