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 2fe7c92..f13dd0e 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):
-        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: