Herelink controller reboots automatically

How to get the log from the device

Do you mean the bug report?
https://docs.cubepilot.org/user-guides/herelink/herelink-user-guides/generate-a-bug-report

Also, have you tried reflashing firmware on Herelink?