mirror of https://github.com/zulip/zulip.git
17 lines
541 B
Python
Executable File
17 lines
541 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
import logging
|
|
import os
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
|
|
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],))
|