Debug logging, serial output truncated

I’ve noticed in my Log handler, when I try to output a long string, it gets truncated and appended with a tilde (~) character. It outputs about 160 characters and truncates the rest. Is this expected?

Hi @picsil - I can confirm that SerialLogHandler uses a buffer that can hold <=160 characters. I believe this is a fixed limit.

2 Likes

Ah, an update! There is a bit of a workaround here, so long as you have access to the log (you can’t affect system logs this way).

Try: LOG_PRINT or LOG_DUMP. You can find more information about this here: https://github.com/particle-iot/device-os/blob/develop/services/inc/logging.h

2 Likes

Thank you for the confirmation, and the alternatives.

1 Like