Use the "standard" django way to get at the settings.
- Legacy-Id: 162
This commit is contained in:
parent
b8aa94d007
commit
78186c7406
|
@ -2,7 +2,7 @@ import syslog
|
||||||
import inspect
|
import inspect
|
||||||
import os.path
|
import os.path
|
||||||
import ietf
|
import ietf
|
||||||
from settings import BASE_DIR
|
from django.conf import settings
|
||||||
|
|
||||||
syslog.openlog("django", syslog.LOG_PID, syslog.LOG_USER)
|
syslog.openlog("django", syslog.LOG_PID, syslog.LOG_USER)
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@ def getcaller():
|
||||||
def log(msg):
|
def log(msg):
|
||||||
mod, cls, func, file, line = getcaller()
|
mod, cls, func, file, line = getcaller()
|
||||||
file = os.path.abspath(file)
|
file = os.path.abspath(file)
|
||||||
file = file.replace(BASE_DIR, "")
|
file = file.replace(settings.BASE_DIR, "")
|
||||||
if func == "<module>":
|
if func == "<module>":
|
||||||
where = ""
|
where = ""
|
||||||
else:
|
else:
|
||||||
where = " in " + func + "()"
|
where = " in " + func + "()"
|
||||||
syslog.syslog("ietf%s(%d)%s: %s" % (file, line, where, msg))
|
syslog.syslog("ietf%s(%d)%s: %s" % (file, line, where, msg))
|
||||||
|
|
||||||
log("IETFdb v%s started" % ietf.__version__)
|
log("IETFdb v%s started" % ietf.__version__)
|
||||||
|
|
Loading…
Reference in a new issue