Data logger for debuging

Something I would be interested in is a data logger where you can track actual data during printing.
Like the temperature graph, but where you can add measurements like fan speed, Z height, Gcode line number etc.
This would be a great debugging tool for those that are modifying their printers (like me) and pin point where a print failed.
And a text printout if possible.

This would go a long ways towards what you are asking:
https://discourse.octoprint.org/t/storing-charting-more-temperatures-and-such/846/4