That's not going to work because all of this stuff... On Sun, Nov 8, 2015 at 9:40 PM, tolerious feng <toleriousn...@gmail.com> wrote:
> TODAY_STRING = datetime.datetime.now().strftime("%F") > TODAY_LOG_DIR = os.path.dirname(__file__) + "/log/" + TODAY_STRING > # TODAY_LOG_DIR = "/log/" + TODAY_STRING > print "*******" > print SITE_SRC_ROOT > print TODAY_LOG_DIR > print os.path.join(SITE_SRC_ROOT, TODAY_LOG_DIR, "todaytotal.log") > print os.path.join(SITE_SRC_ROOT, "log/" + TODAY_STRING, "todaytotal.log"), > if os.path.exists(TODAY_LOG_DIR): > pass > else: > os.mkdir(TODAY_LOG_DIR) > > > ... is only run once, when you startup the app. TODAY_STRING won't change until the next time you restart Django. Instead look logging.TimedRotatingFileHandler. at https://docs.python.org/2/library/logging.handlers.html#timedrotatingfilehandler -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD4ANxUD-Y3ESEUSKwRbbabUFkCFvkKJe2nxNWQZg7GYQ43Eag%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.