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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make DebugLogger usable by not stripping Debug.WriteLine #160
Conversation
Thanks @NZSmartie. The CI will be red because we moved hosting recently. Can fix up later. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this because it helps reduce the workload of our extremely busy maintainers. If you want this issue progressed faster please start talks with a maintainer with how you can help out. There are so many ways to contribute to open-source and the most valued are often not code related. We are always looking for more help and look after those who stick around. Say howdy to one of the maintainers or browse https://reactiveui.net/contribute/ for ideas on where to start your journey.
|
Well, this is still good to merge right? |
I'm not sure if it was meant to work this way. IMHO it would be much better to ask of a developer to implement their own DebugLogger which actually only works when running The |
I could add a |
But that would result in the same as it's working right now, or am I missing something? 馃槃 |
Heh, it wont do the same, as the debug methods would be compiled into the splat library and be usable by developers that use it in their projects in with a configuration that defines This is how it's currently done in ASP.Nets logging framework and is working quite well. This PR is literally taking their idea and using it in Splat. |
|
Looking at the docs, and at the last paragraph in the answer here: https://stackoverflow.com/a/3788719/2782141 that would only work when you're calling the Looking at this from another perspective and hopefully being more helpful at the same time; I get what you mean with your ASP.NET reference, but isn't logging configured per environment there? There it would be intended for a method to work irregardless of So even though we could provide a |
41adc1c
to
ad3bd14
Compare
Thanks @NZSmartie I agree the current DebugLogger is not useful. Merging in now. Sorry for the long delay. |
See https://github.com/reactiveui/splat/releases/tag/5.1.4 for release details.
|
Fixes #46, #58
Closes #123
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
As noted in #46 and #58,
DebugLogger
does not write to the debug output asDebug.WriteLine
is stripped out in release builds of ReactiveUI.Splat.ASPNet Core has a DebugLogger which works, so upon investigating, it was found that by including
#define DEBUG
in the source file, the compiler does not strip out the debug only functions. So this was copied over as shown in this PR.What is the current behavior? (You can also link to an open issue here)
DebugLogger does nothing
What is the new behavior (if this is a feature change)?
DebugLogger writes to the debug output as intended
What might this PR break?
It should break nothing 馃槆
Please check if the PR fulfills these requirements
Other information: