---
name: cloud-logs-agent-helm-maxloglength
title: Configuring the maximum log length
description: 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.
last-updated: 2025-09-03
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/cloud-logs?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Configuring the maximum log length
{: #agent-helm-maxloglength}

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.
{: shortdesc}

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](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-limits&format=markdown#limits-per-instance).

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:

```yaml
maxLogLength: 12000
```