-
Notifications
You must be signed in to change notification settings - Fork 848
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
Refactor serilog initialization and add module initialization logging #2871
Conversation
Reveiw task created: https://virtocommerce.atlassian.net/browse/VCST-2477 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.274
Timestamp: 16-12-2024T16:46:16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.827
Timestamp: 18-12-2024T15:26:52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.992
Timestamp: 19-12-2024T08:01:55
…cId` and `UrlFormat` for better guidance on deprecation. Updated logging statements in `ServiceCollectionExtensions.cs` and `Startup.cs` to use `Log.ForContext<Startup>()` for more context-specific logging. Adjusted logging configuration in `appsettings.Development.json` and `appsettings.Production.json` to include settings for `VirtoCommerce.Platform.Web.Startup` and modified logging levels for `VirtoCommerce.Platform.Modules`.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.734
Timestamp: 19-12-2024T10:38:01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.913
Timestamp: 19-12-2024T10:50:43
Description
Updated Loggin for Production mode:
Added module initialization and post-initialization logging. Can be enabled by this:
Without setting:
With setting:
https://github.com/serilog/serilog-aspnetcore?tab=readme-ov-file#two-stage-initialization
https://github.com/serilog/serilog-extensions-hosting?tab=readme-ov-file#instructions
Replaced
ConsoleLog
with static Serilog'sLog.Logger
andILogger
injection support.ILogger
will not log any messages to Serilog during DI initialization without this changes, because previous implementation registered it at the end of DI registration, after all other services registration.References
QA-test:
Jira-link:
Artifact URL:
Image tag:
ghcr.io/VirtoCommerce/platform:3.874.0-pr-2871-73bd-serilog-and-module-initialization-logging-73bd5596