BIND 10 trac1190, updated. b40cd6851ace87bc97a095cf76b2a0ddee3666ed [1190] Init logging in msgq

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Dec 17 19:11:23 UTC 2012


The branch, trac1190 has been updated
       via  b40cd6851ace87bc97a095cf76b2a0ddee3666ed (commit)
      from  66c563e695df604afe0edab5d52b7fd4f2a871dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b40cd6851ace87bc97a095cf76b2a0ddee3666ed
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Dec 17 20:10:13 2012 +0100

    [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).

-----------------------------------------------------------------------

Summary of changes:
 src/bin/msgq/msgq.py.in |   11 +++++++++++
 1 file changed, 11 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index bd13a1c..fda1b23 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.



More information about the bind10-changes mailing list