-
Notifications
You must be signed in to change notification settings - Fork 6
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
Custom logging instead of NLog-based one (OSOE-402) #206
Comments
Could something like https://github.com/horsdal/InMemoryLogger/blob/master/src/InMemoryLogger.cs be a solution? |
Yep, looks suitable. Through In any case, the FailureDump should still contain a full log file. |
What about using OpenTelemetry for capturing logs / traces and metrics of a specific failed test? |
That could be useful for tracing tests in general, though well beyond the scope of this issue, which is about substituting the See also OrchardCMS/OrchardCore#12251. |
Perhaps the best would be to use |
This would also allow us to better filter log messages. Thus, we wouldn't log |
It's important that we need to log URLs too, since this greatly improved troubleshooting from a failure dump. |
For the record:
Finally, `Meziantou.Extensions.Logging.InMemory is also very rudimentary. |
Currently, the UI Testing Toolbox depends on NLog. In
OrchardApplicationFactory
we configure NLog for logging, andOrchardCoreInstance.GetLogs()
we load the log files. Instead, while retaining support for the app under test to use NLog logging for its own reasons, we could have our custom in-memory logger just for testing. That'd collect log messages about errors and warnings, and we'd use that to check for log entries to fail the test.Decoupling the project from NLog would also prevent issues like this when Orchard updates its NLog version: OrchardCMS/OrchardCore#11194 (comment)
Related: Lombiq/Open-Source-Orchard-Core-Extensions#264 (comment)
Jira issue
The text was updated successfully, but these errors were encountered: