Skip to content

When logging, the message gets lost if there is another message in KeyValue #8232

@manuranga

Description

@manuranga

Description

If there is another filed called message the original message will get overridden.

Steps to Reproduce

import ballerina/log;

type MyMessage record {|
    string message;
|};

public function main() {
    MyMessage myMessage = { message: "secondary message" };
    log:printInfo("main message", (), (), myMessage);
}
time=2025-09-10T15:55:53.001+05:30 level=INFO module=manu/log_bug message="secondary message"

Version

Ballerina 2201.9.2 (Swan Lake Update 9)

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions