Closed lostmsu closed 1 year ago
Workaround until this is released is to not use any of the standard loggers or use DokanNet.Logging.Logger
with debug
action set to null
.
Thanks for the pull request @lostmsu ! That makes me think we should migrate all the logs in this file as you did 😢 since it could also happen for other calls. Do you mind doing the change in this pull request ? That would be very appreciated!
@Liryna I thought of that, and skimmed the file a bit, and the instances that you see in my PR are the only ones I noticed.
@Liryna skimmed again, found and fixed 1 other instance.
Awesome @lostmsu ! Thank you very much for finding and providing the fix 🏆 Do you need me to make a release with the fix ?
No, I am using the workaround for now.
Lol I just hit this again in a new project and spent >30 mins on debugging again :-D
Perhaps a release would be nice.
The error in the debug output was "Throw: Input string was not in a correct format"
The call ends up looking like this:
And the
Debug
interprets it as a format string, and the part of the string between curly braces gets incorrectly interpreted as a placeholder specification.IMHO, a mature logging library should be used instead like Microsoft.Extensions.Logging
Or at the very least to prevent an issue like this there should be an overload without
params object[] args
which would have been selected instead, and which would take the string as the final message rather than format string.