mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
We're in the process of eliminating the bin/ subdirectory in favor of the scripts/ tree, and this one isn't user-facing.
17 lines
544 B
Python
Executable File
17 lines
544 B
Python
Executable File
#!/usr/bin/env python2.7
|
|
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],))
|