]> git.ipfire.org Git - nitsi.git/commitdiff
Fix logging name of networks
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 19 May 2018 08:46:50 +0000 (10:46 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 19 May 2018 08:46:50 +0000 (10:46 +0200)
Before everything was logged under network.xml which is not useful

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
src/nitsi/network.py

index 2fe7c92f23a3c5280731202d02e79e53c1ad9795..f13dd0eb7c585ee56ec5358ad74860fe9eecfe84 100644 (file)
@@ -8,7 +8,7 @@ logger = logging.getLogger("nitsi.network")
 # # A class which define and undefine a virtual network based on an xml file
 class network():
     def __init__(self, libvirt_con, network_xml_file):
 # # A class which define and undefine a virtual network based on an xml file
 class network():
     def __init__(self, libvirt_con, network_xml_file):
-        self.log = logger.getChild(os.path.basename(network_xml_file))
+        self.log = logger.getChild(os.path.basename(os.path.dirname(network_xml_file)))
         self.con = libvirt_con
         try:
             with open(network_xml_file) as fobj:
         self.con = libvirt_con
         try:
             with open(network_xml_file) as fobj: