[IMP] Shutdown all handlers of the logger

bzr revid: stephane@tinyerp.com-20081230175825-tp4zb02tj7py0pb4
This commit is contained in:
Stephane Wirtel 2008-12-30 18:58:25 +01:00
parent dfa35ce376
commit f85e820297
2 changed files with 5 additions and 1 deletions

View File

@ -137,7 +137,7 @@ class LocalService(Service):
raise
def service_exist(name):
return (name in _service) and bool(_service[name])
return _service.get(name, False)
LOG_NOTSET = 'notset'
LOG_DEBUG_RPC = 'debug_rpc'
@ -230,6 +230,9 @@ class Logger(object):
elif result:
level_method(result[0])
def shutdown(self):
logging.shutdown()
import tools
init_logger()

View File

@ -189,6 +189,7 @@ def handler(signum, _):
os.unlink(tools.config['pidfile'])
logger.notifyChannel('shutdown', netsvc.LOG_INFO,
"Shutdown Server! - %s" % ( SIGNALS[signum], ))
logger.shutdown()
sys.exit(0)
for signum in SIGNALS: