From 4af79504f61a68a5cd9a07a154ccd20b43b241f4 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Thu, 7 Sep 2023 15:58:24 +0200
Subject: [PATCH] lib/logger: increase the maximum log arg size from 200 to 500

The 200 chars limit has been appeared too small for typical log messages emitted by VictoriaMetrics components

This is a follow-up for 87fea7d8ac66fe6303622ed78fea0d2df00be7af
---
 docs/CHANGELOG.md    | 2 +-
 lib/logger/logger.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 876e0156d..726110a63 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -43,7 +43,7 @@ The following `tip` changes can be tested by building VictoriaMetrics components
 * FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth.html): added ability to set, override and clear request and response headers on a per-user and per-path basis. See [this i
 ssue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4825) and [these docs](https://docs.victoriametrics.com/vmauth.html#auth-config) for details.
 * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add `eval_offset` attribute for [Groups](https://docs.victoriametrics.com/vmalert.html#groups). If specified, Group will be evaluated at the exact time offset on the range of [0...evaluationInterval]. The setting might be useful for cron-like rules which must be evaluated at specific moments of time. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3409) for details.
-* FEATURE: limit the length of string params in log messages to 200 chars. Longer string params are replaced with the `first_100_chars..last_100_chars`. This prevents from too long log lines, which can be emitted by VictoriaMetrics components.
+* FEATURE: limit the length of string params in log messages to 500 chars. Longer string params are replaced with the `first_250_chars..last_250_chars`. This prevents from too long log lines, which can be emitted by VictoriaMetrics components.
 
 * BUGFIX: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): fix display of ingested rows rate for `Samples ingested/s` and `Samples rate` panels for vmagent's dasbhoard. Previously, not all ingested protocols were accounted in these panels. An extra panel `Rows rate` was added to `Ingestion` section to display the split for rows ingested rate by protocol.
 * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the bug causing render looping when switching to heatmap.
diff --git a/lib/logger/logger.go b/lib/logger/logger.go
index b30f910a4..e5d93660d 100644
--- a/lib/logger/logger.go
+++ b/lib/logger/logger.go
@@ -134,7 +134,7 @@ func logLevelSkipframes(skipframes int, level, format string, args []interface{}
 	if shouldSkipLog(level) {
 		return
 	}
-	msg := formatLogMessage(200, format, args)
+	msg := formatLogMessage(500, format, args)
 	logMessage(level, msg, 3+skipframes)
 }