X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=aspects%2Fomfaspects.py;h=e2fd884532332a17f3eab6031976f845b3cd08f9;hb=313a1747bd361ab42351a65b3c80da42c506c7d9;hp=9b9586002b405fceb2b17d78593a797ed6869e9a;hpb=fb91b11b76fcb533ad76f165ab4f1547f83af817;p=plcapi.git diff --git a/aspects/omfaspects.py b/aspects/omfaspects.py index 9b95860..e2fd884 100644 --- a/aspects/omfaspects.py +++ b/aspects/omfaspects.py @@ -14,9 +14,14 @@ class BaseOMF(object): def __init__(self): self.config = Config("/etc/planetlab/plc_config") - self.log = open("/var/log/omf/plc_slice_calls.log", "a") + # this was only for debugging, no need to log all method calls here -baris + # self.log = open("/var/log/omf/plc_slice_calls.log", "a") + self.log = None + def logit(self, call, args, kwargs, data, slice): + if not self.log: return + self.log.write("%s : args: %s kwargs: %s\n" % (call, args, kwargs)) self.log.write("data: %s\n" % data) self.log.write("%s\n\n" % slice)