From: Michal 'vorner' Vaner Date: Mon, 17 Dec 2012 19:10:13 +0000 (+0100) Subject: [1190] Init logging in msgq X-Git-Tag: bind10-1.0.0-rc-release~95^2~21^2~8^2~14^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b40cd6851ace87bc97a095cf76b2a0ddee3666ed;p=thirdparty%2Fkea.git [1190] Init logging in msgq Using some hardcoded values for file and severity. This is a temporary solution, and we should improve on that, but currently it is not possible to get the configuration in msgq (even though the msgq is used to send it everywhere else). --- diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in index bd13a1c188..fda1b2371a 100755 --- a/src/bin/msgq/msgq.py.in +++ b/src/bin/msgq/msgq.py.in @@ -31,6 +31,7 @@ import select import random from optparse import OptionParser, OptionValueError import isc.util.process +import isc.log import isc.cc @@ -563,6 +564,16 @@ if __name__ == "__main__": help="UNIX domain socket file the msgq daemon will use") (options, args) = parser.parse_args() + # Init logging, according to the parameters. + # FIXME: Do proper logger configuration, this is just a hack + sev = 'INFO' + if options.verbose: + sev = 'DEBUG' + LOG_FILE = os.path.join("@localstatedir@", "@PACKAGE_NAME@", + "msgq.log").replace("${prefix}", "@prefix@") + isc.log.init("b10-msgq", buffer=False, severity=sev, debuglevel=99, + file=LOG_FILE) + signal.signal(signal.SIGTERM, signal_handler) # Announce startup.