-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
No clear path to set a custom logger #432
Comments
It looks like Logary's adapter uses some reflection magic to pull this off: https://github.com/causiq/logary/blob/master/src/adapters/Logary.Adapters.Facade/Logary.Adapters.Facade.fs I imagine it's hypothetically possible to write a different adapter that plugs into something else (i.e. Microsoft.Extensions.Logging), but that's probably easier said than done... EDIT: Line 195 in 2cb90ee
|
Maybe I'm just not having luck following the source code, but it appears to me that logging is service-located at https://github.com/haf/expecto/blob/main/Expecto/Expecto.Impl.fs#L15
I see no clear way to inject Serilog or any other LogProvider. The only example given in documentation appears to show how to get Logary to log into the Expecto logger, without anyway to hook up a custom logger for Expecto to use.
The motivating case might be simple enough to solve, I have dotnet watch test running, which appears to by default, print every single skipped test. I have over 400 tests, and I'm trying to REPL write a new section of 4 tests. so I put in
ftestlist
and proceed.Each change I make I get ~10 lines of errors somewhere in the spam of 400 lines letting me know the name of every single test it skipped.
However I'd like to be able to solve the larger case of being able to hook a different log provider into Expecto.
The text was updated successfully, but these errors were encountered: