setting configuration file is as follows:
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"standard": {
"format": "%(asctime)s %(levelname)s %(message)s"
},
},
"filters": {
},
"handlers": {
"file_handler": {
"level": "DEBUG",
"class": "logging.handlers.RotatingFileHandler",
-sharp "filename":"test.log",
"filename": datetime.datetime.now().strftime("%Y-%m-%d") + ".log",
"formatter": "standard",
"maxBytes": 10,
},
"console":
{
"level": "DEBUG",
"class": "logging.StreamHandler",
"formatter": "standard",
}
},
"loggers": {
"django.request": {
"handlers": ["file_handler"],
"level": "DEBUG",
"propagate": True,
},
"django": {
"handlers": ["file_handler"],
"level": "DEBUG",
"propagate": True
},
"info_logger": {
"handlers": ["file_handler"],
"level": "DEBUG",
"propagate": True
},
}
}
ran for one day, the file operation was 100m, and then the file name was not changed to the latest day according to the format.
django 2.0.1
could you tell me what"s wrong?