Django application not working after i add watchtower logging
import boto3
boto3_logs_client = boto3.client("logs", region_name=AWS_REGION_NAME)
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': logging.ERROR,
'handlers': ['console'],
},
'formatters': {
'simple': {
'format': "%(asctime)s [%(levelname)-8s] %(message)s",
'datefmt': "%Y-%m-%d %H:%M:%S"
},
'aws': {
# you can add specific format for aws here
'format': "%(asctime)s [%(levelname)-8s] %(message)s",
'datefmt': "%Y-%m-%d %H:%M:%S"
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'watchtower': {
'level': 'DEBUG',
'class': 'watchtower.CloudWatchLogHandler',
'boto3_client': boto3_logs_client,
'log_group_name': AWS_LOG_GROUP,
'log_stream_name': AWS_LOG_STREAM,
'formatter': 'aws',
},
},
'loggers': {
'django': {
'level': 'INFO',
'handlers': ['watchtower'],
'propagate': False,
},
# add your other loggers here...
},
}
Here i implemented watchtower
logging in my django app
My server is running but when i view http://127.0.0.1:8000/
This site can’t be reached
what can be the error ? am i missing something please take a look.
please take a look how can i fix this