SF.net SVN: gar:[23680] csw/mgar/gar/v2/lib/web
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Thu May 22 11:55:23 CEST 2014
Revision: 23680
http://sourceforge.net/p/gar/code/23680
Author: wahwah
Date: 2014-05-22 09:55:23 +0000 (Thu, 22 May 2014)
Log Message:
-----------
web apps: Use logging paths from the config file
Modified Paths:
--------------
csw/mgar/gar/v2/lib/web/pkgdb_web.py
csw/mgar/gar/v2/lib/web/releases_web.py
Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py 2014-05-22 09:39:24 UTC (rev 23679)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py 2014-05-22 09:55:23 UTC (rev 23680)
@@ -22,12 +22,14 @@
# sys.stderr.write("Python path is {}.\n".format(sys.path))
from lib.python import checkpkg_lib
+from lib.python import configuration
from lib.python import models
from lib.python import representations
from lib.web import web_lib
-LOG_FILE_TMPL = '/opt/csw/apache2/var/log/buildfarm/pkgdb-web.log'
+config = configuration.GetConfig()
+LOG_FILE_TMPL = config.get("pkgdb_app", "log_file")
urls_html = (
r'/', 'index',
Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py 2014-05-22 09:39:24 UTC (rev 23679)
+++ csw/mgar/gar/v2/lib/web/releases_web.py 2014-05-22 09:55:23 UTC (rev 23680)
@@ -43,11 +43,11 @@
r'/svr4/([0-9a-f]{32})/db-level-1/', 'Srv4RelationalLevelOne',
r'/svr4/([0-9a-f]{32})/db-level-2/', 'Srv4RelationalLevelTwo',
r'/blob/([^/]+)/([0-9a-f]{32})/', 'JsonStorage',
+ r'/catalog-releases/([a-z]+)/', 'CatalogRelease',
r'/catalogs/([^/]+)/([^/]+)/([^/]+)/([0-9a-f]{32})/', 'Srv4CatalogAssignment',
r'/rpc/bulk-existing-svr4/', 'QueryExistingSvr4',
)
-LOG_FILE_TMPL = '/opt/csw/apache2/var/log/buildfarm/releases-web.log'
templatedir = os.path.join(os.path.dirname(__file__), "templates/")
render = web.template.render(templatedir)
@@ -65,7 +65,7 @@
applogger = logging.getLogger('opencsw')
applogger.setLevel(logging.DEBUG)
-log_handler = logging.FileHandler(filename=LOG_FILE_TMPL)
+log_handler = logging.FileHandler(filename=config.get("releases_app", "log_file"))
log_handler.setLevel(logging.DEBUG)
log_formatter = logging.Formatter(
'%(process)d %(levelname)s %(asctime)s '
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list