OMF integration for plcapi, only activated when PLC_OMF_ENABLED is true.
[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 def apply_aspects():
10
11     # TEST
12     #from pyaspects.debuggeraspect import DebuggerAspect
13     #weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")
14
15     # track all PLC methods to add OMF hooks
16     weave_class_method(OMFAspect(), Method, "__call__")