See https://issues.apache.org/jira/browse/DRILL-8044 for background.
The code added there is now out of date. After the log4j panic late last year, 5 commits were made to modify the real log4j class and these are missing from the Drill copy.
Compare https://github.com/apache/logging-log4j2/commits/rel/2.17.2/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java to https://github.com/apache/logging-log4j2/commits/rel/2.14.1/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java
The Drill copy is based on Log4J 2.14.1. Every commit in 2021 and 2022 is missing from the Drill copy.