[IMP] Shutdown all handlers of the logger
bzr revid: stephane@tinyerp.com-20081230175825-tp4zb02tj7py0pb4
This commit is contained in:
parent
dfa35ce376
commit
f85e820297
|
@ -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()
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue