Changeset - 04d26165c3d9
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 14 years ago 2012-03-05 01:46:08
marcin@python-works.com
Whoosh logging is now controlled by the .ini files logging setup
5 files changed with 26 insertions and 6 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -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 ##
 
##############
production.ini
Show inline comments
 
@@ -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 ##
 
##############
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
@@ -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 ##
 
##############
rhodecode/lib/indexers/__init__.py
Show inline comments
 
@@ -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.')
rhodecode/lib/utils.py
Show inline comments
 
@@ -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)
0 comments (0 inline, 0 general)