logging TCP orientation?

How can I log the orientation of the TCP to file? What coordinatesystem is the orientation? Euler ZYX?