[druid-user] How to specify %m{nolookups} in log4j xml?

We are trying to

“Specify “%m{nolookups}” in the PatternLayout configuration in
log4j2.xml file. Druid installations may have multiple log4j2.xml
files; be sure to update all of them.”

Can you provide an example how to specify the same?

I know this is a trivial or simple ask. But please help.


We have sample log4j.xml as follows.


Considering the last comment (from Volkan Yazici) on this issue

I would say you have nothing to do as you are using the JsonLayout and not the pattern layout.

Example with %m{nolookups} is the syntax used when using PatternLayout (https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout)

However, I’m not 100% sure if the removal of the class from the jar may still be necessary.

In this case, example command provided in the issue is

zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class

Also note that Jihoon Son wrote about the JndiManager class that can be removed.


pls provide sample log4j.xml to include “%m{nolookups}”

my sample log4j.xml

<?xml version="1.0" encoding="UTF-8" ?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at


In the PatternLayout line, replace %m with %m{nolookups}

1 Like