IBM Cloud Docs
Why are my log lines so long?

Why are my log lines so long?

Virtual Private Cloud Classic infrastructure

You set up a logging configuration in your cluster to forward logs to an external syslog server. When you view logs, you see a long log message. Additionally, in Kibana, you might be able to see only the last 600 - 700 characters of the log message.

A long log message might be truncated due to its length before it is collected by Fluentd, so the log might not be parsed correctly by Fluentd before it is forwarded to your syslog server.

To limit line length, you can configure your own logger to have a maximum length for the stack_trace in each log.

For example, if you are using Log4j for your logger, you can use an EnhancedPatternLayout to limit the stack_trace to 15KB.