Commit 0b491fcc authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

modules/defs.py.sample: DIR_LOG, LOG_{DEBUG|INFO} and REVERSE_IP in defs.py

parent 4e80e044
......@@ -45,7 +45,7 @@ def log():
lines = []
file = open('/var/vidjil/'+request.vars["file"])
file = open(defs.DIR_LOG+request.vars["file"])
if "filter" not in request.vars :
request.vars["filter"] = ""
......
......@@ -222,7 +222,7 @@ auth.enable_record_versioning(db)
ips = {}
try:
for l in open('/home/vidjil/ips.txt'):
for l in open(defs.REVERSE_IP):
ip, kw = l.split()
ips[ip] = kw
except:
......@@ -263,12 +263,12 @@ def _init_log():
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('[%(process)d] %(asctime)s %(levelname)8s - %(filename)s:%(lineno)d\t%(message)s')
handler = logging.FileHandler('/var/vidjil/vidjil-debug.log')
handler = logging.FileHandler(defs.LOG_DEBUG)
handler.setLevel(logging.DEBUG)
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = logging.FileHandler('/var/vidjil/vidjil.log')
handler = logging.FileHandler(defs.LOG_INFO)
handler.setLevel(logging.INFO)
handler.setFormatter(formatter)
logger.addHandler(handler)
......
......@@ -26,3 +26,11 @@ DIR_FUSE = '../'
### Port on which to run the fuse server
### Used in models/task.py and in /server/fuseserver.py
PORT_FUSE_SERVER = 12789
### Log files
DIR_LOG = '/var/vidjil/'
LOG_INFO = DIR_LOG + 'vidjil.log'
LOG_DEBUG = DIR_LOG + 'vidjil-debug.log'
### Reverse IP file
REVERSE_IP = '/home/vidjil/ips.txt'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment