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
Fix #1158: add outputDebugString level 4 to omit debug info #1167
Fix #1158: add outputDebugString level 4 to omit debug info #1167
Conversation
…d redundant call to ComposeErrorMessage when unnecessary
…ly happen if message level is 0 just like on the server-side
7d09d3a
to
7d8ca27
Compare
If this is only available for level Alternatively, we could keep your feature behind an extra boolean, but also make it work for any level. What do you think? |
I do like the idea of moving it to its own type/level. Much cleaner solution than an additional bool I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for new level
@@ -55,6 +55,21 @@ void CScriptDebugging::LogCustom(lua_State* luaVM, unsigned char ucRed, unsigned | |||
VSNPRINTF(szBuffer, MAX_STRING_LENGTH, szFormat, marker); | |||
va_end(marker); | |||
|
|||
SLuaDebugInfo luaDebugInfo; | |||
LogString("", luaDebugInfo, szBuffer, 0, ucRed, ucGreen, ucBlue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new LogCustom still uses 0 as the uiMinimumDebugLevel so that we don't have to add a 4th level to /debugscript and instead simply show them in the same level as previous custom-level messages. The differenciation between LogCustom and LogDebug is based on whether DEBUG_INFO_NONE
of SLuaDebugInfo is used instead of real debug info.
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, I hoped this would get rid of the "Changes requested" message
This pull adds a new parameter to outputDebugString for omitting file path and line number info from a custom debug message. This pull closes #1158