startup scripts : assume initscripts is not installed, only use systemctl
[plcapi.git] / aspects / __init__.py
1 from pyaspects.weaver import weave_class_method
2
3 from PLC.Method import Method
4 from aspects.ratelimitaspects import RateLimitAspect
5
6 def apply_ratelimit_aspect():
7     weave_class_method(RateLimitAspect(), Method, "__call__")
8
9 def apply_debugger_aspect():
10     # just log all method calls w/ their parameters
11     from pyaspects.debuggeraspect import DebuggerAspect
12     weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")
13
14