categorylanri import qilish qoshildi

This commit is contained in:
Husanjonazamov
2026-03-26 14:06:37 +05:00
parent 00f9e6be54
commit bcea5f4a70
13 changed files with 319 additions and 56 deletions

View File

@@ -18,43 +18,25 @@ LOGGING = {
"disable_existing_loggers": False,
"formatters": {
"verbose": {
"format": "%(asctime)s %(name)s %(levelname)s %(pathname)s:%(lineno)d - %(message)s",
},
},
"filters": {
"exclude_errors": {
"()": ExcludeErrorsFilter,
"format": "%(asctime)s %(name)s %(levelname)s - %(message)s",
},
},
"handlers": {
"daily_rotating_file": {
"level": "INFO",
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": LOG_DIR / "django.log",
"when": "midnight",
"backupCount": 30,
"formatter": "verbose",
"filters": ["exclude_errors"],
},
"error_file": {
"level": "ERROR",
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": LOG_DIR / "django_error.log",
"when": "midnight",
"backupCount": 30,
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
"formatter": "verbose",
},
},
"root": {
"handlers": ["console"],
"level": "INFO",
},
"loggers": {
"django": {
"handlers": ["daily_rotating_file", "error_file"],
"handlers": ["console"],
"level": "INFO",
"propagate": True,
},
"root": {
"handlers": ["daily_rotating_file", "error_file"],
"level": "INFO",
"propagate": True,
"propagate": False,
},
},
}