Skip to content

[backport 3.3] log: fix truncating log message to 1024 bytes in 'json' log#11142

Merged
Totktonada merged 1 commit intorelease/3.3from
backport/release/3.3/10952
Feb 12, 2025
Merged

[backport 3.3] log: fix truncating log message to 1024 bytes in 'json' log#11142
Totktonada merged 1 commit intorelease/3.3from
backport/release/3.3/10952

Conversation

@TarantoolBot
Copy link
Collaborator

@TarantoolBot TarantoolBot commented Feb 12, 2025

(This PR is a backport of #10952 to release/3.3 to a future 3.3.2 release.)


Before this patch, when log format was set to 'json' and log entry was written with format-string API (require('log').info(<format string>, args...)), in the output the message was truncated to 1024 bytes.

This patch fixes this behavior, and now the message will only be truncated if the full log entry (with all the context) doesn't fit into the 16KiB buffer. The message will be truncated in a way, so all the context is present.

Closes #10918

NO_DOC=bugfix

Before this patch, when log format was set to 'json' and log entry was
written with format-string API (`require('log').info(<format string>,
args...)`), in the output the message was truncated to 1024 bytes.

This patch fixes this behavior, and now the message will only be
truncated if the full log entry (with all the context) doesn't fit into
the 16KiB buffer. The message will be truncated in a way, so all the
context is present.

Closes #10918

NO_DOC=bugfix

(cherry picked from commit 6b891b4)
@TarantoolBot TarantoolBot requested a review from a team as a code owner February 12, 2025 19:46
@TarantoolBot TarantoolBot added the full-ci Enables all tests for a pull request label Feb 12, 2025
@TarantoolBot TarantoolBot changed the title [Backport release/3.3] log: fix truncating log message to 1024 bytes in 'json' log [backport 3.3] log: fix truncating log message to 1024 bytes in 'json' log Feb 12, 2025
@Totktonada Totktonada removed the request for review from a team February 12, 2025 20:03
@Totktonada Totktonada merged commit 0dce970 into release/3.3 Feb 12, 2025
61 of 80 checks passed
@Totktonada Totktonada deleted the backport/release/3.3/10952 branch February 12, 2025 23:05
@Totktonada Totktonada removed their assignment Feb 12, 2025
@coveralls
Copy link

Coverage Status

coverage: 87.365%. first build
when pulling 66a728f on backport/release/3.3/10952
into 7a6df2e
on release/3.3
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants