我已经在我的django应用程序中集成了django频道和redis服务器,但是我正在运行我的django应用程序,我一直在做文章
aioredis[38]连接|调试|创建tcp连接到('redis',6379)
有人能帮我如何禁用aioredis的连接调试打印或什么可能是我得到这个打印的原因。请注意,客户端ws已成功连接到django服务器的ws连接
下面是我正在使用的channels和channels的版本
通道数~=2.0,>=2.0.2通道数~=2.0
我已经在docker yml的6379端口上托管了redis服务器
version: "2"
services:
redis:
image: redis:latest
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- redis
项目中的记录器设置
LOG_LEVEL = "DEBUG"
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'()': 'colorlog.ColoredFormatter',
'format':'%(asctime)s %(name)s[%(process)d] %(module)25s| %(log_color)s%(levelname)8s| %(message)s',
'datefmt':'%Y%m%d %H:%M:%S'
},
'simple': {
' format': '%(levelname)s %(message)s'
},
},
'handlers': {
'console':{
'level': LOG_LEVEL,
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
},
'root': {
'handlers': ['console'],
'level': LOG_LEVEL,
'propagate': True,
},
'loggers': {
'django': {
'handlers': ['console'],
'propagate': True,
'level': LOG_LEVEL,
},
'': {
'level': LOG_LEVEL,
'handlers': ['console'],
},
'gunicorn.access': {
'handlers': ['console']
},
'gunicorn.error': {
'handlers': ['console']
}
}
}
1条答案
按热度按时间ukqbszuj1#
将此项添加到日志配置中的记录器列表中