git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't apply all aspects blindly (although there is only one for the moment...)
[plcapi.git]
/
aspects
/
__init__.py
diff --git
a/aspects/__init__.py
b/aspects/__init__.py
index
bcce3bc
..
1df5a9f
100644
(file)
--- a/
aspects/__init__.py
+++ b/
aspects/__init__.py
@@
-6,11
+6,15
@@
from PLC.Method import Method
from aspects.omfaspects import OMFAspect
from aspects.omfaspects import OMFAspect
-def apply_aspects():
-
- # TEST
- #from pyaspects.debuggeraspect import DebuggerAspect
- #weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")
+def apply_omf_aspect():
# track all PLC methods to add OMF hooks
weave_class_method(OMFAspect(), Method, "__call__")
# track all PLC methods to add OMF hooks
weave_class_method(OMFAspect(), Method, "__call__")
+
+
+def apply_debugger_aspect():
+ # just log all method calls w/ their parameters
+ from pyaspects.debuggeraspect import DebuggerAspect
+ weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")
+
+