Fix version output when missing.
[plcapi.git] / aspects / __init__.py
1
2
3 from pyaspects.weaver import weave_class_method
4
5 from PLC.Method import Method
6 from aspects.omfaspects import OMFAspect
7
8
9
10 def apply_omf_aspect():
11     # track all PLC methods to add OMF hooks
12     weave_class_method(OMFAspect(), Method, "__call__")
13
14
15 def apply_debugger_aspect():
16     # just log all method calls w/ their parameters
17     from pyaspects.debuggeraspect import DebuggerAspect
18     weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")
19
20