-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Fix LogPrint to LogPrintf #8230
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
Conversation
Printing Log without category defined should use LogPrintf
utACK |
utACK ba61949 |
utACK ba61949 At some point we either need to rename one of those functions, or create an automatic checker for Printf/LogPrintf arguments, or both. |
ba61949 Fix LogPrint to LogPrintf (TheLazieR Yip)
I hate that this isn't typesafe, what is this, PHP? :) ... when I saw the ticket open I felt immediately stupid, sure than it must have been me that did this again. (posthumous utACK). |
Eh, why is this merging into 0.12 though?
Well it was a step up from C's printf - none of this will allow mangling values or corrupting memory.
(tinyformat even uses this internally, but emulates C printf-isms because that was what was already in the code and this had the least impact) Then again, there's so much to do already, it's never been urgent. |
Printing Log without category defined should use LogPrintf Github-Pull: #8230 Meta: PR should have been based on master in the first place
Forward-ported to master as bf9c70b. |
Changing the debug category into an enum would also avoid type ambiguity
(which arises from the fact that the format string and the debug category
are both strings).
|
That's a neat idea, a problem with that is that it requires centralizing all the debug categories of the program in one place. That would be inimical to modularization. Another option would be to create a DebugCategory type that is based on string, and only allow passing that as category argument.
|
Printing Log without category defined should use LogPrintf