You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package follows a pattern of directly writing to Console when errors occur. This is highly undesirable, especially for those who are writing console-based apps and would like to handle that experience differently.
To Reproduce
Steps to reproduce the behavior:
Write a console app with an intentional UX
Make an error happen on the OBS connection
See the error message directly interrupt the UX
Expected behavior
The library should provide an ILogger-based way of handling error logs. This improves UX concerns, as well as makes error messages actually useful for users, as they now have an opportunity to intercept them in-code.
Screenshots
N/A
Versions
Latest, as of 5/21/2024
Additional context
I'm programmatically creating some input sources using this library, which results in Unsupported Event: InputSettingsChanged <payload> being written to console with no way to disable it... This is extremely frustrating as I'm writing a console app and it's polluting my output. As a general best practice, libraries should NEVER blindly write to the Console - that's the whole reason the ILogger<> abstraction exists.
Worse yet, the library doesn't even provide a mechanism to allow consumers to implement/handle "unsupported events" themselves. So there's literally no way for me to prevent this output from happening, despite the fact it's a "supported scenario" in the library. (Creating input sources programmatically.)
The text was updated successfully, but these errors were encountered:
DrEsteban
changed the title
Writing error messages to directly Console is bad form
[ISSUE] Writing error messages to directly Console is bad form
May 12, 2024
DrEsteban
changed the title
[ISSUE] Writing error messages to directly Console is bad form
[ISSUE] Writing error messages directly to Console is bad form
May 13, 2024
Issue Type
Describe the issue
obs-websocket-dotnet/obs-websocket-dotnet/Events.cs
Lines 522 to 526 in b8ae595
The package follows a pattern of directly writing to Console when errors occur. This is highly undesirable, especially for those who are writing console-based apps and would like to handle that experience differently.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The library should provide an
ILogger
-based way of handling error logs. This improves UX concerns, as well as makes error messages actually useful for users, as they now have an opportunity to intercept them in-code.Screenshots
N/A
Versions
Latest, as of 5/21/2024
Additional context
I'm programmatically creating some input sources using this library, which results in
Unsupported Event: InputSettingsChanged <payload>
being written to console with no way to disable it... This is extremely frustrating as I'm writing a console app and it's polluting my output. As a general best practice, libraries should NEVER blindly write to the Console - that's the whole reason theILogger<>
abstraction exists.Worse yet, the library doesn't even provide a mechanism to allow consumers to implement/handle "unsupported events" themselves. So there's literally no way for me to prevent this output from happening, despite the fact it's a "supported scenario" in the library. (Creating input sources programmatically.)
The text was updated successfully, but these errors were encountered: