2015-10-04 18:56:26 +02:00
|
|
|
#!/usr/bin/env python2.7
|
2013-11-19 00:04:45 +01:00
|
|
|
import sys
|
|
|
|
import logging
|
|
|
|
import os
|
2016-05-08 04:00:48 +02:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
|
2013-11-19 00:04:45 +01:00
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
logger = logging.getLogger("zulip.management")
|
|
|
|
file_handler = logging.FileHandler(settings.MANAGEMENT_LOG_PATH)
|
|
|
|
formatter = logging.Formatter("%(asctime)s: %(message)s")
|
|
|
|
file_handler.setFormatter(formatter)
|
|
|
|
logger.addHandler(file_handler)
|
|
|
|
logger.setLevel(logging.INFO)
|
|
|
|
|
|
|
|
logger.info("Ran '%s'" % (sys.argv[1],))
|