[ROOT] / doc / toc / ARCCore / Enum / ARConcepts / ExposingApplicationState
The traditional debugging process usually entails reading through logs and querying about your application state through a debugging tool.
AgoRapide instead encourages logs and application state to be distributed over the PropertyStream by default, thereby making debugging simpler (the information is always available, and not restricted to some local access).
You are encouraged to expose your internal application state to the PropertyStream through the use of Logger (and possible also use PKLogAttribute) like in PConcurrent.
It is recommended to prefix these data points by app.
This has two implications (as implemented by PConcurrent):
1) Any call to Log / HandleException ends up in the property stream.
2) Any change to internal properties will be reflected in the property stream automatically without even having to make 'manual' calls to Log (because all calls to -SetP- will automatically be logged to the property stream).
Some example classes inheriting PConcurrent and using this principle in AgoRapide are:
StreamProcessor (search for code like 'IP.SetPV(StreamProcessorP.ClientUpdatePositionPath ...)
ActualConnection (search for code like 'IP.Inc(ActualConnectionP.CountReceiveMessage)')
In summary, much of the inner working of these classes are automatically exposed to the property stream without any special code having to be added.
Note how manual calls to Log are also automatically exposed to the property stream in these classes.
Note how threads are always given a descriptive name in these classes, making the logging even easier to follow.
All this makes debugging and understanding the inner workings of your applications much easier reducing the need for external logging and debugging tools.
Note also that by exposing the internal application state to the PropertyStream it can be read 'from' wherever convenient.
In other words, you do not have to limit use of IP to only data-objects like 'Customer', 'Order' and similar, but you can also use it for internal parts of your application.
Note that calls to Log will by default not be exposed to the PropertyStream.
Generated 2021-06-19 14:39:18.557 UTC