How to log assertion failures

Hi. I make pretty liberal use of c-style assertions in my code. Unfortunately, it seems like my device is restarting before logging is completed, as I get a lot of lines like 0000003631 [hal] ERROR: Assertion failed: <a couple more characters, than an abrubt end to the message>. Usually, it doesn’t make it far enough to indicate which particular assertion failed. What can I do to get the whole message over the USB serial port?