RS 232 serial sniffing
There are commercial solutions but here's the schematic and photo of a little DIY system I made a number of years back to handle the hardware side things, from left to right passes through all signals between the system being analyzed and the top and bottom you can connect to a pair of RS-232 ports on a PC or laptop. Port A at the top for example will show data received by port A on the left:





To explain the above further here is the pinout of a male DB-9 connector taken from Quatech QSC-100D documentation which is the DTE connector you'd typically find on a PC:



So the grounds are connected together between all connectors and pin 2 is the receive pin allowing data to be received on a PC at the top and bottom. If you were only interested in data flowing in one direction one of those connectors could be omitted, but it may make send to include both in case you require it in the future. The left-most connector is male and the remainder are female DB-9 connectors.

For software if running Windows I'd recommend RealTerm which has a nice array of display options including hexadecimal and it supports logging including timestamps.