Logread output is truncated for messages longer than 1040 characters

I am using Teltonika router(TRB145) which has OpenWrt on it. It uses logd for logging of processes ( It is setup to send the log messages into memory rather than file). Unfortunatly when I read the logs with "logread -f" command, log messages that are longer than 1040 characters, are truncated.

Anyone knows how can I tackle this issue?

Best Regards,

What is your ring buffer size setting?

uci get system.system.log_size

shows me 256

First guess is that there is a defined max size of a message in logd in the ubox package.

(size of a single item should have no relation to the size of the whole ring buffer. This is about individual log message's size)

1 Like

Reason is:

#define LOG_LINE_SIZE 1024

The difference between 1040 and 1024 is probably the time stamp. The actual payload is just max 1024 chars.


Anyone knows how can I tackle this issue?

If you want to change it, you need to change the ubox sources, and recompile both the log daemon and the logread tool. Likely not possible unless you recompile the whole firmware.

1 Like

Exactly, it is per message.