-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW-FEATURE] Add logging for the CRUD operations including time meas…
…urement. (#473) * Create draft PR for #472 * Add identity management to AxoApplication and AxoLogger - Added `System.Security.Principal` namespace to `AxoApplication.cs` and `IAxoApplication.cs`. - Introduced `ControllerIdentity` property in `AxoApplication` and `IAxoApplication`. - Created new internal class `ControllerIdentity` inheriting from `GenericIdentity`. - Updated `AxoLogger` to use `ControllerIdentity` from `AxoApplication.Current`. Add ControllerIdentity property and refactor logging Included System.Security.Principal namespace in AxoApplication.cs and IAxoApplication.cs. Added ControllerIdentity property to AxoApplication class and IAxoApplication interface. Introduced ControllerIdentity class inheriting from GenericIdentity in ControllerIdentity.cs. Updated AxoLogger.cs to use ControllerIdentity from AxoApplication.Current for logging. * Add Stopwatch to log execution time of remote operations Introduce Stopwatch to AxoDataExchange class to measure execution time. Add private Stopwatch field `sw` to the class. Modify RemoteCreate, RemoteRead, RemoteUpdate, RemoteDelete, RemoteEntityExist, and RemoteCreateOrUpdate methods to start and stop the stopwatch. Log the elapsed time with record identifier, data exchange symbol, and time in milliseconds using AxoApplication.Current.Logger.Information. --------- Co-authored-by: PTKu <61538034+PTKu@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
51 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Security.Principal; | ||
|
||
namespace AXOpen; | ||
|
||
/// <summary> | ||
/// Provides identity for the operations from the controller. | ||
/// </summary> | ||
internal class ControllerIdentity() : GenericIdentity("Controller"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters