IBM Cloud Docs
Configuring the maximum log length

Configuring the maximum log length

If you have very long logs which exceed the maximum line length, specifying maxLogLength will truncate the log line to the specified number of characters. Truncating the log line ensures that the complete metadata is sent to IBM Cloud Logs. If you want to apply processing by IBM Cloud Logs, for example, using parsing rules, you need to keep the metadata and JSON structure of your log intact. The number of characters after which the log line will be truncated is determined by the maxLogLength value. The maxLogLength value can be between 1 and 30000 characters.

The length of your metadata needs to be considered when specifying a maxLogLength value. The longer your metadata, the smaller your maxLogLength should be. The overall log size, including metadata, cannot exceed the ingestion limits.

By default logs are not truncated before they are sent to IBM Cloud Logs and will only be truncated when a maxLogLength value is specified.

For example:

maxLogLength: 12000