Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW-FEATURE] Add logging for the CRUD operations including time measurement. #472

Closed
PTKu opened this issue Dec 10, 2024 · 2 comments · Fixed by #473
Closed

[NEW-FEATURE] Add logging for the CRUD operations including time measurement. #472

PTKu opened this issue Dec 10, 2024 · 2 comments · Fixed by #473

Comments

@PTKu
Copy link
Member

PTKu commented Dec 10, 2024

No description provided.

@PTKu
Copy link
Member Author

PTKu commented Dec 10, 2024

/cib

@IX-BOT
Copy link
Contributor

IX-BOT commented Dec 10, 2024

IX-BOT added a commit that referenced this issue Dec 10, 2024
PTKu added a commit that referenced this issue Dec 10, 2024
…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>
@PTKu PTKu closed this as completed in #473 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants