Inserting myself in serial communication
You may be able to sniff the communication from the Raspberry Pi itself,
with no extra hardware. Assuming the program on the Pi can be configured
to use a serial port other than /dev/ttyACM0, a sniffing
program could create a pseudo-terminal pair, then forward data back and
forth between /dev/ttyACM0 and the master pseudo-terminal, while
logging everything. If you point your Pi application to the slave
pseudo-terminal, you have your man-in-the-middle logger:

Arduino --(/dev/ttyACM0)-- logger --(pseudo-tty)-- application


The interesting thing about a slave pseudo-terminal is that, as far as
the application is concerned, it behaves exactly like a regular serial
port.

There seem to be quite a few implementations if this idea. C.f. the
answers to these other stack exchange questions:


How can I monitor serial port traffic?
Sniff serial port on Linux


Just as an example, the README of
interceptty states:


  interceptty is designed to sit between a serial port (or other
  terminal device, or program, or socket, or something connected to a
  file descriptor) and a program which is communicating with that
  device, recording everything that goes back and forth between the two.
  It does this by opening the real device, creating a pseudo-tty, then
  forwarding everything between the two, recording whatever it sees.