# HG changeset patch # User Marcin Kuzminski # Date 2012-03-05 00:46:08 # Node ID 04d26165c3d91aa37efb6abe6c29f8dfd1f1c5c5 # Parent df96adcbb1f78cb42d3553d5f89205520a61bcea Whoosh logging is now controlled by the .ini files logging setup diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -171,6 +171,7 @@ beaker.cache.sql_cache_long.key_length = beaker.session.type = file beaker.session.key = rhodecode +# secure cookie requires AES python libraries #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu #beaker.session.validate_key = 9712sds2212c--zxc123 beaker.session.timeout = 36000 @@ -213,7 +214,7 @@ sqlalchemy.convert_unicode = true ### LOGGING CONFIGURATION #### ################################ [loggers] -keys = root, routes, rhodecode, sqlalchemy, beaker, templates +keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer [handlers] keys = console, console_sql @@ -259,6 +260,12 @@ handlers = console_sql qualname = sqlalchemy.engine propagate = 0 +[logger_whoosh_indexer] +level = DEBUG +handlers = +qualname = whoosh_indexer +propagate = 1 + ############## ## HANDLERS ## ############## diff --git a/production.ini b/production.ini --- a/production.ini +++ b/production.ini @@ -214,7 +214,7 @@ sqlalchemy.convert_unicode = true ### LOGGING CONFIGURATION #### ################################ [loggers] -keys = root, routes, rhodecode, sqlalchemy, beaker, templates +keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer [handlers] keys = console, console_sql @@ -260,6 +260,12 @@ handlers = console_sql qualname = sqlalchemy.engine propagate = 0 +[logger_whoosh_indexer] +level = DEBUG +handlers = +qualname = whoosh_indexer +propagate = 1 + ############## ## HANDLERS ## ############## diff --git a/rhodecode/config/deployment.ini_tmpl b/rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl +++ b/rhodecode/config/deployment.ini_tmpl @@ -224,7 +224,7 @@ sqlalchemy.convert_unicode = true ### LOGGING CONFIGURATION #### ################################ [loggers] -keys = root, routes, rhodecode, sqlalchemy, beaker, templates +keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer [handlers] keys = console, console_sql @@ -270,6 +270,12 @@ handlers = console_sql qualname = sqlalchemy.engine propagate = 0 +[logger_whoosh_indexer] +level = DEBUG +handlers = +qualname = whoosh_indexer +propagate = 1 + ############## ## HANDLERS ## ############## diff --git a/rhodecode/lib/indexers/__init__.py b/rhodecode/lib/indexers/__init__.py --- a/rhodecode/lib/indexers/__init__.py +++ b/rhodecode/lib/indexers/__init__.py @@ -25,6 +25,7 @@ import os import sys import traceback +import logging from os.path import dirname as dn, join as jn #to get the rhodecode import @@ -84,7 +85,7 @@ class MakeIndex(BasePasterCommand): parser = Command.standard_parser(verbose=True) def command(self): - + logging.config.fileConfig(self.path_to_ini_file) from pylons import config add_cache(config) engine = engine_from_config(config, 'sqlalchemy.db1.') diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -629,6 +629,6 @@ class BasePasterCommand(Command): """ from pylons import config as pylonsconfig - path_to_ini_file = os.path.realpath(conf) - conf = paste.deploy.appconfig('config:' + path_to_ini_file) + self.path_to_ini_file = os.path.realpath(conf) + conf = paste.deploy.appconfig('config:' + self.path_to_ini_file) pylonsconfig.init_app(conf.global_conf, conf.local_conf)