Author: dmeyer
Date: Thu Feb 15 11:47:59 2007
New Revision: 9218
Modified:
trunk/core/src/conf.py
Log:
expose LOGDIR again (needed in tvserver)
Modified: trunk/core/src/conf.py
==============================================================================
--- trunk/core/src/conf.py (original)
+++ trunk/core/src/conf.py Thu Feb 15 11:47:59 2007
@@ -54,7 +54,7 @@
# That's it, you shouldn't need to make changes after this point
-__all__ = [ 'datafile', 'SHAREDIR', 'cfgfilepath' ]
+__all__ = [ 'datafile', 'SHAREDIR', 'LOGDIR', 'cfgfilepath' ]
# Python imports
import os
@@ -155,16 +155,16 @@
logfiletmpl = logfiletmpl[7:]
try:
- logdir = '/var/log/' + application
- logfile = '%s/%s-%s' % (logdir, logfiletmpl, os.getuid())
- if not os.path.isdir(logdir):
- os.makedirs(logdir)
+ LOGDIR = '/var/log/' + application
+ logfile = '%s/%s-%s' % (LOGDIR, logfiletmpl, os.getuid())
+ if not os.path.isdir(LOGDIR):
+ os.makedirs(LOGDIR)
handler = RotatingFileHandler(logfile, maxBytes=1000000, backupCount=2)
except (OSError, IOError):
- logdir = os.path.expanduser('~/.' + application + '/log')
- logfile = '%s/%s' % (logdir, logfiletmpl)
- if not os.path.isdir(logdir):
- os.makedirs(logdir)
+ LOGDIR = os.path.expanduser('~/.' + application + '/log')
+ logfile = '%s/%s' % (LOGDIR, logfiletmpl)
+ if not os.path.isdir(LOGDIR):
+ os.makedirs(LOGDIR)
handler = RotatingFileHandler(logfile, maxBytes=1000000, backupCount=2)
handler.setFormatter(formatter)
logger.addHandler(handler)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog