Bootterm is a simple, reliable and powerful terminal designed to ease connection to ephemeral serial ports as found on various SBCs, and typically USB-based ones.
Its available in AUR or can be compiled easyly because its a single .c file.
For debian/ubuntu
sudo apt install git build-essential
and then compile
git clone https://github.com/wtarreau/bootterm
cd bootterm
make
sudo make install
Windows WSL1 needs this make commands
make DEF_CFLAGS=-DNO_TCGETS2=1
Open terminal with 115200 baud
bt -b 115200 /dev/ttyUSB0
Open terminal and log everything with timestamps to -f log file.
#!/bin/sh
DEV=$1
bt -b 115200 -c fixed -t abs -f "$DEV-%Y%m%d-%H%M%S.log" /dev/$DEV