Adam Litke has posted comments on this change.

Change subject: Add (debug ...) command to enable logging from inside the policy
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

Great idea but I have a different idea on how to implement it.

....................................................
File mom/Policy/Parser.py
Line 382:     def c_debug(self, *values):
Line 383:         'value ...'
Line 384:         logging.getLogger("mom.Evaluator").debug("debug: %s", values)
Line 385:         return values[-1]
Line 386: 
This certainly will work but I don't think it is the right way to do it.  This 
is really an extension to our language and not part of core LISP.  Therefore, 
would you try adding this as an injected function (in the same way we add 'abs' 
to the evaluator.
Line 387:     def c_let(self, syms, *code):
Line 388:         'code code ...'
Line 389:         if type(syms) != list:
Line 390:             raise PolicyError('Expecting list as arg 1 in let')


-- 
To view, visit http://gerrit.ovirt.org/21725
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I23dae405908a4d801dc9ac28a9fe2caff698f603
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to