it works when i remove the formatter line ! Op zondag 8 december 2019 09:44:15 UTC+1 schreef Franz Ulenaers: > > i get a problem with the 'formatter' : 'standard' > Watching for file changes with StatReloader > Exception in thread django-main-thread: > Traceback (most recent call last): > File "/usr/lib/python3.7/logging/config.py", line 700, in > configure_handler > formatter = self.config['formatters'][formatter] > File "/usr/lib/python3.7/logging/config.py", line 324, in __getitem__ > value = dict.__getitem__(self, key) > KeyError: 'standard' > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "/usr/lib/python3.7/logging/config.py", line 563, in configure > handler = self.configure_handler(handlers[name]) > File "/usr/lib/python3.7/logging/config.py", line 703, in > configure_handler > '%r' % formatter) from e > ValueError: Unable to set formatter 'standard' > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner > self.run() > File "/usr/lib/python3.7/threading.py", line 870, in run > self._target(*self._args, **self._kwargs) > File > "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line > 54, in wrapper > fn(*args, **kwargs) > File > "/usr/local/lib/python3.7/dist-packages/django/core/management/commands/runserver.py", > > line 109, in inner_run > autoreload.raise_last_exception() > File > "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line > 77, in raise_last_exception > raise _exception[1] > File > "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", > line 337, in execute > autoreload.check_errors(django.setup)() > File > "/usr/local/lib/python3.7/dist-packages/django/utils/autoreload.py", line > 54, in wrapper > fn(*args, **kwargs) > File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line > 19, in setup > configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) > File "/usr/local/lib/python3.7/dist-packages/django/utils/log.py", line > 76, in configure_logging > logging_config_func(logging_settings) > File "/usr/lib/python3.7/logging/config.py", line 800, in dictConfig > dictConfigClass(config).configure() > File "/usr/lib/python3.7/logging/config.py", line 571, in configure > '%r' % name) from e > ValueError: Unable to configure handler 'file' > > > Op zondag 8 december 2019 09:07:37 UTC+1 schreef Arulselvam K: >> >> Hi, >> >> How do we configure log settings so that every day generates new log file >> and also based on max file size? >> >> I am able to use "RotatingFileHandler" to rotates files based on max file >> size with following settings. >> 'handlers': { >> 'file': { >> 'level': 'DEBUG', >> 'backupCount': 10, # how many backup file to keep, 10 days >> 'class': 'logging.handlers.RotatingFileHandler', >> 'filename': '/home/iness/logs/vconnect.log', >> 'maxBytes': 1024*1024*1, # 1MB >> 'backupCount': 10, >> 'formatter': 'standard' >> }, >> } >> >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4571f199-8ca8-46eb-8ac5-2ecb4069381e%40googlegroups.com.