added my old logging config
This commit is contained in:
parent
4cfb75d563
commit
dd4f92ca1e
|
@ -0,0 +1,26 @@
|
||||||
|
[TIME[2023-06-03 21:49:51,872] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[7] THREAD[140464426821440] MESSAGE[Watching for file changes with StatReloader]
|
||||||
|
[TIME[2023-06-03 21:58:35,767] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[7] THREAD[140464426821440] MESSAGE[/app/gawa/settings.py changed, reloading.]
|
||||||
|
[TIME[2023-06-03 21:58:36,728] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[9] THREAD[140232828950336] MESSAGE[Watching for file changes with StatReloader]
|
||||||
|
[TIME[2023-06-03 21:58:36,728] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[9] THREAD[140232828950336] MESSAGE[Watching for file changes with StatReloader]
|
||||||
|
[TIME[2023-06-03 21:59:17,277] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[9] THREAD[140232828950336] MESSAGE[/app/gawa/settings.py changed, reloading.]
|
||||||
|
[TIME[2023-06-03 21:59:17,277] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[9] THREAD[140232828950336] MESSAGE[/app/gawa/settings.py changed, reloading.]
|
||||||
|
[TIME[2023-06-03 21:59:18,370] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[11] THREAD[140632004777792] MESSAGE[Watching for file changes with StatReloader]
|
||||||
|
[TIME[2023-06-03 21:59:18,370] LEVEL[INFO] MODULE[autoreload] NAME[django.utils.autoreload] PID[11] THREAD[140632004777792] MESSAGE[Watching for file changes with StatReloader]
|
||||||
|
[TIME[2023-06-03 21:59:26,361] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:26,361] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:26,363] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /ensd/blog/test/test HTTP/1.1" 404 2230]
|
||||||
|
[TIME[2023-06-03 21:59:26,592] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:26,592] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:26,593] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /favicon.ico HTTP/1.1" 404 2206]
|
||||||
|
[TIME[2023-06-03 21:59:58,471] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:58,471] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:58,474] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /ensd/blog/test/test HTTP/1.1" 404 2230]
|
||||||
|
[TIME[2023-06-03 21:59:58,903] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:58,903] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:58,907] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /favicon.ico HTTP/1.1" 404 2206]
|
||||||
|
[TIME[2023-06-03 22:00:28,959] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 22:00:28,959] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 22:00:28,960] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /ensd/blog/test/test HTTP/1.1" 404 2230]
|
||||||
|
[TIME[2023-06-03 22:00:29,473] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 22:00:29,473] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 22:00:29,474] LEVEL[WARNING] MODULE[basehttp] NAME[django.server] PID[11] THREAD[140631958742784] MESSAGE["GET /favicon.ico HTTP/1.1" 404 2206]
|
|
@ -0,0 +1,12 @@
|
||||||
|
[TIME[2023-06-03 21:59:26,361] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:26,361] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:26,592] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:26,592] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:58,471] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:58,471] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 21:59:58,903] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 21:59:58,903] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 22:00:28,959] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 22:00:28,959] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /ensd/blog/test/test]
|
||||||
|
[TIME[2023-06-03 22:00:29,473] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
||||||
|
[TIME[2023-06-03 22:00:29,473] LEVEL[WARNING] MODULE[log] NAME[django.request] PID[11] THREAD[140631958742784] MESSAGE[Not Found: /favicon.ico]
|
|
@ -166,3 +166,121 @@ COMPRESS_PRECOMPILERS = (
|
||||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
||||||
|
# Logging configs
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
"version": 1,
|
||||||
|
"disable_existing_loggers": False,
|
||||||
|
"filters": {
|
||||||
|
"require_debug_false": {
|
||||||
|
"()": "django.utils.log.RequireDebugFalse",
|
||||||
|
},
|
||||||
|
"require_debug_true": {
|
||||||
|
"()": "django.utils.log.RequireDebugTrue",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"formatters": {
|
||||||
|
"django.server": {
|
||||||
|
"()": "django.utils.log.ServerFormatter",
|
||||||
|
"format": "[{server_time}] {message}",
|
||||||
|
"style": "{",
|
||||||
|
},
|
||||||
|
'verbose': {
|
||||||
|
'format': '[TIME[{asctime}] LEVEL[{levelname}] MODULE[{module}] NAME[{name}] PID[{process:d}] THREAD[{thread:d}] MESSAGE[{message}]',
|
||||||
|
'style': '{',
|
||||||
|
},
|
||||||
|
'mail': {
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'format': 'TIME[{asctime}] LEVEL[{levelname}] MODULE[{module}] NAME[{name}] PID[{process:d}] THREAD[{thread:d}]\nMESSAGE[{message}]',
|
||||||
|
'style': '{',
|
||||||
|
},
|
||||||
|
'simple': {
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'format': '{levelname} {message}',
|
||||||
|
'style': '{',
|
||||||
|
},
|
||||||
|
'fancym': {
|
||||||
|
'()': 'colorlog.ColoredFormatter',
|
||||||
|
'format': '%(log_color)s[%(asctime)s][%(levelname)s][%(name)s]:\n[%(message)s]',
|
||||||
|
'log_colors': {
|
||||||
|
'DEBUG': 'cyan',
|
||||||
|
'INFO': 'green',
|
||||||
|
'WARNING': 'yellow',
|
||||||
|
'ERROR': 'red',
|
||||||
|
'CRITICAL': 'bold_red',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'fancy': {
|
||||||
|
'()': 'colorlog.ColoredFormatter',
|
||||||
|
'format': '%(log_color)s[%(asctime)s][%(levelname)s][%(name)s][%(message)s]',
|
||||||
|
'log_colors': {
|
||||||
|
'DEBUG': 'cyan',
|
||||||
|
'INFO': 'green',
|
||||||
|
'WARNING': 'yellow',
|
||||||
|
'ERROR': 'red',
|
||||||
|
'CRITICAL': 'bold_red',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'fancy_internal': {
|
||||||
|
'()': 'colorlog.ColoredFormatter',
|
||||||
|
'format': '%(log_color)s[%(asctime)s][%(levelname)s][%(name)s][%(message)s]',
|
||||||
|
'log_colors': {
|
||||||
|
'DEBUG': 'thin_cyan',
|
||||||
|
'INFO': 'thin_green',
|
||||||
|
'WARNING': 'yellow',
|
||||||
|
'ERROR': 'red',
|
||||||
|
'CRITICAL': 'bold_red',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"handlers": {
|
||||||
|
"console": {
|
||||||
|
"level": "INFO",
|
||||||
|
"filters": ["require_debug_true"],
|
||||||
|
"class": "logging.StreamHandler",
|
||||||
|
"formatter": "fancym",
|
||||||
|
},
|
||||||
|
"django.server": {
|
||||||
|
"level": "INFO",
|
||||||
|
"class": "logging.StreamHandler",
|
||||||
|
"formatter": "django.server",
|
||||||
|
},
|
||||||
|
"mail_admins": {
|
||||||
|
"level": "ERROR",
|
||||||
|
"filters": ["require_debug_false"],
|
||||||
|
"class": "django.utils.log.AdminEmailHandler",
|
||||||
|
},
|
||||||
|
'file': {
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'class': 'logging.FileHandler',
|
||||||
|
'filename': 'debug.log',
|
||||||
|
'formatter': 'verbose',
|
||||||
|
},
|
||||||
|
'file_errors': {
|
||||||
|
'level': 'WARNING',
|
||||||
|
'class': 'logging.FileHandler',
|
||||||
|
'filename': 'errors.log',
|
||||||
|
'formatter': 'verbose',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"loggers": {
|
||||||
|
"django": {
|
||||||
|
"handlers": ["console", "mail_admins", "file", "file_errors"],
|
||||||
|
"level": "INFO",
|
||||||
|
},
|
||||||
|
"django.server": {
|
||||||
|
"handlers": ["django.server", "file"],
|
||||||
|
"level": "INFO",
|
||||||
|
"propagate": False,
|
||||||
|
},
|
||||||
|
"": {
|
||||||
|
"handlers": ["console", "mail_admins", "file", "file_errors"],
|
||||||
|
"level": "DEBUG",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,3 +4,4 @@ mysqlclient>=1.4.3
|
||||||
django_compressor>=2.2
|
django_compressor>=2.2
|
||||||
django-libsass>=0.7
|
django-libsass>=0.7
|
||||||
pillow>=9.0.0
|
pillow>=9.0.0
|
||||||
|
colorlog>=6.7.0
|
||||||
|
|
Loading…
Reference in New Issue