[JAVA-4521] Simplify logging enabled and formatting checks Created: 08/Mar/22  Updated: 14/Sep/23

Status: Backlog
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Instead of doing:

                if (LOGGER.isWarnEnabled()) {
                    LOGGER.warn(format("Exception thrown raising server opening event to listener %s", cur), e);
                }

Follow the org.slf4j pattern in the code of:

void warn(String var1, Object... var2);

So then you could do:

LOGGER.warn("Exception thrown raising server opening event to listener {}", cur, e);


Generated at Thu Feb 08 09:02:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.