I'm working on a Python toolbox and the function to get the geoprocessing messages doesn't seem to work as documented. I'm just using the arcpy.GetMessages() function
arcpy<SPAN class="punctuation token">.</SPAN>AddMessage<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>GetMessages<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
and the result is
Start Time: Thursday, January 10, 2019 3:21:16 PM
Succeeded at Thursday, January 10, 2019 3:21:29 PM (Elapsed Time: 12.40 seconds)<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
If I use the arcpy.GetMessageCount() function, it likewise returns 2 as the result. This page of message documentation says that when using the GetMessages function "the first message gives the tool executed, and the last message gives the ending and elapsed time for the tool's execution. The tool's second and last messages always give the start and end time, respectively, for the tool's execution."
The part that I need, the name of the tool executed, isn't coming through. Even if I use the GetMessage function and specify the 0 index position, it still returns the start time. What am I missing?