You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we log not much actions that happen during the framework work. And some of them are not informative at all.
Let's consider an example from helpers/stateful.py
Method start from class Stateful
def start(self, obj=""):
"""Try to start object"""
if self.state != STATE_STOPPED:
if obj == "":
tf_cfg.dbg(3, "Not stopped")
else:
tf_cfg.dbg(3, "%s not stopped" % obj)
return
self.state = STATE_BEGIN_START
self._exceptions = list()
self.run_start()
self.state = STATE_STARTED
class Stateful is parent for many other classes.
Here, we do not have any logged information about what is happening, I mean, information, that we beginning start and for what, information about states, information, that we finished start successfully for what, etc.
Also, line such tf_cfg.dbg(3, "Not stopped") is not informative at all, as I mentioned, class Stateful is parent for many other classes, and if this log is involved, we do not have any information.
In opposite, in some places we have duplicated logs such:
24-10-03 22:37:00.555500 WARNING | lxc cmd: sudo lxc list -f json tf_cfg.py:245
24-10-03 22:37:00.556650 INFO | Run command 'sudo lxc list -f json' on host localhost with environment {}
It is hard to debug problems during the work.
we need to log every important action
we need to have informative logs
we need to remove logs duplicates
we need to set correct log levels
The text was updated successfully, but these errors were encountered:
Currently, we log not much actions that happen during the framework work. And some of them are not informative at all.
Let's consider an example from
helpers/stateful.py
Method
start
fromclass Stateful
class Stateful
is parent for many other classes.Here, we do not have any logged information about what is happening, I mean, information, that we beginning
start
and for what, information about states, information, that we finishedstart
successfully for what, etc.Also, line such
tf_cfg.dbg(3, "Not stopped")
is not informative at all, as I mentioned,class Stateful
is parent for many other classes, and if this log is involved, we do not have any information.In opposite, in some places we have duplicated logs such:
It is hard to debug problems during the work.
The text was updated successfully, but these errors were encountered: