NBlood
NBlood copied to clipboard
initprintf also log to nblood.log (issue #610)
I'm not sure if this would be too verbose but it could probably help people file bug reports or diagnose any issues
https://github.com/nukeykt/NBlood/issues/610
Since this is in Build and not only for Blood, the comment is not precise because it is not necessarily just nblood.log
. Other games log to different filenames.
Since this is in Build and not only for Blood, the comment is not precise because it is not necessarily just
nblood.log
. Other games log to different filenames.
fixed that comment, this pull request can be squash merged to avoid the pointless extra commit
I've asked about this, and TerminX has confirmed my assumption. Basically, initprintf
is supposed to be used only for messages printed to the startup window. In order to log to a file, you can use either one of the newer logging functions, or OSD_Printf
.
In the case of NBlood's map crc check, the check itself exists in the relevant DOS version; I don't know if the use of initprintf
was a mistake or not.
I've asked about this, and TerminX has confirmed my assumption. Basically,
initprintf
is supposed to be used only for messages printed to the startup window. In order to log to a file, you can use either one of the newer logging functions, orOSD_Printf
.In the case of NBlood's map crc check, the check itself exists in the relevant DOS version; I don't know if the use of
initprintf
was a mistake or not.
Maybe you would be able to see the message if you're starting a dedicated server?
So we should probably instead fix Blood's dbLoadMap function to make it log to both? Or we should make a new function in db.cpp that logs to both, call it like mapLoadLog or something
I heard a bit more. Fixing the NBlood code indeed looks like the right answer.
initprintf
calls initputs
, which used to call OSD_Puts
in older versions of EDuke32 (and JFBuild). So in older versions of NBlood, the call to initprintf
did print the message to file. Maybe this was done like that so not all calls to initprintf
(used after game startup) would have to be replaced with OSD_Printf
.
With the transition to the newer logging functions (using loguru), this was changed, due to concerns like the ability to print things from different threads.
Thanks!
The changes have been reverted for this specific PR. See the comments written in this PR earlier; The change should be in the Blood tree instead of the Build Engine.