Project

General

Profile

Feature #2502

List vessel PIDs in debug log

Added by TruePikachu almost 10 years ago.

Status:
New
Severity:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Platform:
Any
Expansion:
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

In the tracing of #2501, I noticed that the log provided doesn't give PIDs in a number of circumstances, like when removing vessels due to getObtAtUT returning NaN. You end up with things like "[OrbitDriver Warning!]: Kaeris II T Debris had a NaN Orbit and was removed.". However, there is no way to tell exactly what vessel it corresponds to. For example, is that fddf7dcdea6e439aa4982659b34447ff (which had NaN in the orbit) or 64741ae6072644d2b9fa997cf978ca44 (which looked normal).

I suggest a change from something like
sprintf(debug_log_vessel_name,"%s",vessel.name);
to
sprintf(debug_log_vessel_name,"''%s'' (PID=%032x)",vessel.name,vessel.pid);
(which would make a log entry be something like "[OrbitDriver Warning!]: ''Kaeris II T Debris'' (PID=64741ae6072644d2b9fa997cf978ca44) had a NaN Orbit and was removed.")

Also available in: Atom PDF