Skip to content

Number of placeholder and arguments mismatch in log message #4304

@liketic

Description

@liketic

Describe the bug
We have some log like:

log.debug("[{}] Redirecting the rest call to {}: cluster={}", redirect, peerClusterData);

The number of {} is different to arguments count. And for exception logging:

log.warn("Failed to offload: {}", e.getCause());

The last argument type is Throwable , here is last argument will not be treated as a format argument even there is a placeholder.

Metadata

Metadata

Assignees

Labels

type/bugThe PR fixed a bug or issue reported a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions