Compare commits

..

No commits in common. "6b110b61b82b25553fa708f590d271d674fc0975" and "6ced99df157d2be589fb64f859a977781b9169d9" have entirely different histories.

View File

@ -13,7 +13,6 @@ https://docs.djangoproject.com/en/5.1/ref/settings/
from pathlib import Path
import config
from logging.handlers import SocketHandler as _SocketHandler
import os
import random
import stat
@ -182,23 +181,13 @@ if SECRET_KEY is None:
# Logging Configuration
#
ROOT_LOGGER_NAME = os.path.basename(os.path.dirname(__file__))
default_handler = ['socket'] if DEBUG else ['console']
class DjangoSocketHandler(_SocketHandler):
def emit(self, record):
if hasattr(record, 'request'):
record.request = None
return super().emit(record)
ROOT_LOGGER_NAME = 'apps'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'short': {
'format': "%(asctime)s \"%(name)s - %(levelname)s - %(message)s\"",
'format': "%(name)25s - %(levelname)10s - %(message)s",
'datefmt': '[%d/%b/%Y %H:%M:%S]',
},
'long': {
@ -214,21 +203,15 @@ File "%(pathname)s", line %(lineno)d, in %(funcName)s
'class': 'logging.StreamHandler',
'formatter': 'short',
},
'socket': {
'level': 'DEBUG',
'class': f'{ROOT_LOGGER_NAME}.settings.DjangoSocketHandler',
'host': '127.0.0.1',
'port': 19996,
},
},
'loggers': {
'django': {
'handlers': default_handler,
'handlers': ['console'],
'level': 'INFO',
'propagate': False,
},
ROOT_LOGGER_NAME: {
'handlers': default_handler,
'handlers': ['console'],
'level': 'DEBUG' if DEBUG else 'INFO',
'propagate': False,
},