Author: dmeyer
Date: Sun Aug 12 05:23:19 2007
New Revision: 9816
Log:
support importing freevo from python command line
Modified:
trunk/core/src/conf.py
Modified: trunk/core/src/conf.py
==============================================================================
--- trunk/core/src/conf.py (original)
+++ trunk/core/src/conf.py Sun Aug 12 05:23:19 2007
@@ -125,10 +125,13 @@
formatter = logging.Formatter('%(asctime)s %(levelname)-8s [%(name)6s] '+\
'%(filename)s %(lineno)s: '+\
'%(message)s')
-logfiletmpl = os.path.splitext(os.path.basename(sys.argv[0]))[0]
-if logfiletmpl.startswith('freevo-'):
- logfiletmpl = logfiletmpl[7:]
-
+if sys.argv[0]:
+ logfiletmpl = os.path.splitext(os.path.basename(sys.argv[0]))[0]
+ if logfiletmpl.startswith('freevo-'):
+ logfiletmpl = logfiletmpl[7:]
+else:
+ logfiletmpl = 'python'
+
try:
LOGDIR = '/var/log/' + application
logfile = '%s/%s-%s' % (LOGDIR, logfiletmpl, os.getuid())
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog