fixes logger initialization inside Cli constructor
@@ -120,6 +120,12 @@ class Cli:
output=None, debug=False, logFileName=None, config=None,
useNodeReg=False, withNode=True, unique_name=None,
override_tags=None, nodes_chroot: str=None):
+
+ if logFileName:
+ Logger().enableFileLogging(logFileName)
+ else:
+ Logger().enableStdLogging()
+
self.unique_name = unique_name
self.curClientPort = None
self.basedirpath = os.path.expanduser(basedirpath)
@@ -237,9 +243,6 @@ class Cli:
Logger().enableCliLogging(self.out,
override_tags=override_tags)
- if logFileName:
- Logger().enableFileLogging(logFileName)
-
self.logger = getlogger("cli")
self.print("\n{}-CLI (c) 2017 Evernym, Inc.".format(self.properName))
self._actions = []
