args=("%(syslog_socket)s",)
[formatter_simpleFormatter]
-format=%(name)s - %(levelname)s - %(message)s
+format=%(name)s[%(process)d] - %(levelname)s - %(message)s
"""
# set up logger
- logger = configure_logging(os.path.basename(sys.argv[0]))
+ logger = configure_logging("gerrithooks")
# get parameters from command line
params = parser(sys.argv[1:])
if not (key.startswith("_") or key =="debug") ])
params_string = ", ".join(["%s: %s" % (key, getattr(params, key)) for key in
params_keys ])
- logger.info("Event %s: %s", hook, params_string)
-
if not 'debug' in params or not params.debug:
logger.debug("Daemonizing...")
daemonize()
+ logger.info("Event %s: %s", hook, params_string)
+
logger.debug("looking for config")
confname = "gerrithooks.conf"
conf = find_config(confname, subdir="gerrithooks")
# read rules from configuration file
config = ConfigParser.RawConfigParser()
- #config.optionxform = str
+ config.optionxform = str
logger.debug("runner: reading config from %s", conf)
config.read(conf)